mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
remove logs
This commit is contained in:
@@ -83,7 +83,6 @@ router.patch('/:code/players', async function (req, res) {
|
||||
gameManager.joinGame(game, req.body.playerName, inUseCookie, req.body.joinAsSpectator).then((data) => {
|
||||
res.status(200).send({ cookie: data, environment: gameManager.environment });
|
||||
}).catch((data) => {
|
||||
console.log(data);
|
||||
res.status(data.status).send(data.reason);
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -62,13 +62,11 @@ class GameManager {
|
||||
gameParams.hasDedicatedModerator,
|
||||
gameParams.isTestGame
|
||||
);
|
||||
console.log(req.isTestGame);
|
||||
const newAccessCode = await this.generateAccessCode(globals.ACCESS_CODE_CHAR_POOL);
|
||||
if (newAccessCode === null) {
|
||||
return Promise.reject(globals.ERROR_MESSAGE.NO_UNIQUE_ACCESS_CODE);
|
||||
}
|
||||
const moderator = initializeModerator(req.moderatorName, req.hasDedicatedModerator);
|
||||
console.log(moderator);
|
||||
moderator.assigned = true;
|
||||
if (req.timerParams !== null) {
|
||||
req.timerParams.paused = true;
|
||||
@@ -93,8 +91,8 @@ class GameManager {
|
||||
});
|
||||
return Promise.resolve({ accessCode: newAccessCode, cookie: moderator.cookie, environment: this.environment });
|
||||
}).catch((message) => {
|
||||
console.log(message);
|
||||
this.logger.debug('Received invalid request to create new game.');
|
||||
console.error(message);
|
||||
this.logger.error('Received invalid request to create new game.');
|
||||
return Promise.reject(message);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user