fix: improve error semantics, clarify answer key type
This commit is contained in:
parent
6eaf282651
commit
648c5d2979
6 changed files with 62 additions and 34 deletions
|
|
@ -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>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue