xiongzhu 2 лет назад
Родитель
Сommit
3f468cdf65
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      src/game/game.service.ts

+ 5 - 5
src/game/game.service.ts

@@ -618,8 +618,8 @@ export class GameService implements OnModuleInit {
         const newGame = await this.gameRepository.save(
             new Game({
                 ...game,
-                id: null,
-                createdAt: null,
+                id: undefined,
+                createdAt: undefined,
                 resetNum: game.resetNum + 1,
                 status: GameStatus.Initialized
             })
@@ -627,11 +627,11 @@ export class GameService implements OnModuleInit {
         const newState = await this.gameStateRepository.save(
             new GameState({
                 ...firstState,
-                id: null,
-                createdAt: null,
+                id: undefined,
+                createdAt: undefined,
                 gameId: newGame.id,
                 firstState: true,
-                lastState: null
+                lastState: undefined
             })
         )
         this.send(`${game.id}`, {