Complete the game answer flow: - Add evaluateAnswer service function: looks up the session in the GameSessionStore, compares the submitted optionId against the stored correct answer, returns an AnswerResult. - Add submitAnswer controller with safeParse validation and error handling (session/question not found → 404). - Add POST /api/v1/game/answer route. - Fix createGameSession: was missing the answerKey tracking and the gameSessionStore.create() call, so sessions were never persisted. The full singleplayer game loop now works end-to-end: POST /game/start → GameSession, POST /game/answer → AnswerResult. |
||
|---|---|---|
| .. | ||
| src | ||
| Dockerfile | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||