chore(backend): assert user joined
This commit is contained in:
parent
04792b501e
commit
b969821019
|
|
@ -295,6 +295,9 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
|
||||||
isLlotheo: false,
|
isLlotheo: false,
|
||||||
noIrregularRules: options.noIrregularRules,
|
noIrregularRules: options.noIrregularRules,
|
||||||
}, { relations: ['user1', 'user2'] });
|
}, { relations: ['user1', 'user2'] });
|
||||||
|
if (game.user1 === gane.user2) {
|
||||||
|
throw new Error('broken match');
|
||||||
|
}
|
||||||
this.cacheGame(game);
|
this.cacheGame(game);
|
||||||
|
|
||||||
const packed = await this.reversiGameEntityService.packDetail(game);
|
const packed = await this.reversiGameEntityService.packDetail(game);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue