0
0
Fork 0

Add ResetGame types

This commit is contained in:
Oliver-Akins 2021-01-07 18:15:32 -07:00
parent aa5159d10f
commit 3441e5acd2
2 changed files with 6 additions and 1 deletions

View file

@ -1,7 +1,7 @@
import { games, log } from '../main'; import { games, log } from '../main';
import { Server, Socket } from 'socket.io'; import { Server, Socket } from 'socket.io';
export default (io: Server, socket: Socket, data: any) => { export default (io: Server, socket: Socket, data: ResetGame) => {
try { try {
if (!games[data.game_code]) { if (!games[data.game_code]) {
log.debug(`Can't find game with code: ${data.game_code}`); log.debug(`Can't find game with code: ${data.game_code}`);

View file

@ -45,6 +45,11 @@ interface StartGame {
} }
interface GameStarted extends response {} interface GameStarted extends response {}
interface ResetGame {
game_code: string;
}
interface GameReset extends response {}
interface GetPastQuestions { interface GetPastQuestions {
game_code: string; game_code: string;