diff --git a/Server/src/socket.ts b/Server/src/socket.ts index 7803588..2de0a8a 100644 --- a/Server/src/socket.ts +++ b/Server/src/socket.ts @@ -96,8 +96,8 @@ export function setupSocket(io: any) { // TODO check params on react socket.on(c.CREATE_LOBBY, (data: { code: string, numQuestionsParam: number, categories: string[], admin: string }) => { - console.log('Creo la lobby con [codice - domande - admin]: ', code, ' - ', numQuestionsParam, ' - ', admin); - const newGame = actualGameManager.createGame(code, numQuestionsParam, admin); + console.log('Creo la lobby con [codice - domande - admin]: ', data.code, ' - ', data.numQuestionsParam, ' - ', data.admin); + const newGame = actualGameManager.createGame(data.code, data.numQuestionsParam, data.admin); const allSelectedQuestions = data.categories .map(category => AllQuestions[category as QuestionCategories]) // Mappa le categorie alle domande