fix: improve error semantics, clarify answer key type

This commit is contained in:
lila 2026-04-28 16:07:19 +02:00
parent 6eaf282651
commit 648c5d2979
6 changed files with 62 additions and 34 deletions

View file

@ -1,4 +1,7 @@
export type GameSessionData = { answers: Map<string, number>; userId: string };
export type GameSessionData = {
answers: Map<string, { correctOptionId: number }>;
userId: string;
};
export interface GameSessionStore {
create(
@ -9,4 +12,4 @@ export interface GameSessionStore {
get(sessionId: string): Promise<GameSessionData | null>;
update(sessionId: string, data: GameSessionData): Promise<void>;
delete(sessionId: string): Promise<void>;
}
}