formatting
This commit is contained in:
parent
35e54014b3
commit
4f47e18ad9
7 changed files with 119 additions and 124 deletions
|
|
@ -27,7 +27,7 @@ export function createApp() {
|
|||
|
||||
const store = new InMemoryGameSessionStore();
|
||||
app.use("/api/v1", createApiRouter(store));
|
||||
|
||||
|
||||
app.use(errorHandler);
|
||||
|
||||
return app;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ describe("POST /api/v1/game/answer", () => {
|
|||
expect(body.success).toBe(false);
|
||||
expect(body.error).toContain("Question already answered");
|
||||
});
|
||||
|
||||
|
||||
it("returns 400 when a field has an invalid value", async () => {
|
||||
const res = await request(app)
|
||||
.post("/api/v1/game/start")
|
||||
|
|
|
|||
|
|
@ -30,4 +30,4 @@ export class UnprocessableEntityError extends AppError {
|
|||
constructor(message: string) {
|
||||
super(message, 422);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ export const createGameRouter = (store: GameSessionStore): Router => {
|
|||
|
||||
router.post("/start", controller.createGame as express.RequestHandler);
|
||||
router.post("/answer", controller.submitAnswer as express.RequestHandler);
|
||||
|
||||
|
||||
return router;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue