TGD-52 Fix #6
2 changed files with 12 additions and 0 deletions
|
|
@ -45,4 +45,10 @@ export class GameController {
|
||||||
this.logger.warn(`[clearQueue] enter`);
|
this.logger.warn(`[clearQueue] enter`);
|
||||||
await this.gameService.clearGameQueue();
|
await this.gameService.clearGameQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('simulate-valid-answer')
|
||||||
|
async simulateValidAnswer() {
|
||||||
|
this.logger.verbose(`[simulateValidAnswer] enter`);
|
||||||
|
return await this.gameService.simulateValidAnswer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ import {ConfigService} from "@nestjs/config";
|
||||||
import {gameCards} from "./entities/cards.entities";
|
import {gameCards} from "./entities/cards.entities";
|
||||||
import {IEmptyNotification} from "../Consts/types";
|
import {IEmptyNotification} from "../Consts/types";
|
||||||
import {ClientNotificationType} from "../socket/socket.gateway";
|
import {ClientNotificationType} from "../socket/socket.gateway";
|
||||||
|
import {GetGuestQuery} from "../guests/queries/getguest.query";
|
||||||
|
import {ValidAnswerReceivedEvent} from "./events/valid-answer.recieved";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GameService implements OnApplicationBootstrap{
|
export class GameService implements OnApplicationBootstrap{
|
||||||
|
|
@ -110,4 +112,8 @@ export class GameService implements OnApplicationBootstrap{
|
||||||
await this.gameQueueModel.deleteMany({}).exec();
|
await this.gameQueueModel.deleteMany({}).exec();
|
||||||
return { result: true };
|
return { result: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async simulateValidAnswer() {
|
||||||
|
this.eventBus.publish(new ValidAnswerReceivedEvent(11178819, 'test', ''));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue