Commit 84b3bd32 authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Code rearranging

parent 2b9fa7ca
...@@ -78,10 +78,13 @@ export class QuizRouter extends AbstractRouter { ...@@ -78,10 +78,13 @@ export class QuizRouter extends AbstractRouter {
return { return {
status: StatusProtocol.Success, status: StatusProtocol.Success,
step: quiz ? [QuizState.Active, QuizState.Running].includes(quiz.state) ? MessageProtocol.Available : quiz.privateKey === token step: quiz ? //
? MessageProtocol.Editable [QuizState.Active, QuizState.Running].includes(quiz.state) ? //
: MessageProtocol.AlreadyTaken MessageProtocol.Available : //
: MessageProtocol.Unavailable, quiz.privateKey === token ? //
MessageProtocol.Editable : //
MessageProtocol.AlreadyTaken : //
MessageProtocol.Unavailable, //
payload, payload,
}; };
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment