summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/othello/games/show.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
commitbfc193d8cd9aecdb82d585e8b4e101deac60a5bb (patch)
tree8b4dac3a56cf703650c8207f9279028a8560a96b /src/server/api/endpoints/othello/games/show.ts
parentresolve conflict (diff)
downloadsharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.gz
sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.bz2
sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.zip
Resolve conflicts
Diffstat (limited to 'src/server/api/endpoints/othello/games/show.ts')
-rw-r--r--src/server/api/endpoints/othello/games/show.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/api/endpoints/othello/games/show.ts b/src/server/api/endpoints/othello/games/show.ts
index 2b0db4dd00..f9084682fa 100644
--- a/src/server/api/endpoints/othello/games/show.ts
+++ b/src/server/api/endpoints/othello/games/show.ts
@@ -1,22 +1,22 @@
import $ from 'cafy';
-import Game, { pack } from '../../../models/othello-game';
+import OthelloGame, { pack } from '../../../models/othello-game';
import Othello from '../../../../common/othello/core';
module.exports = (params, user) => new Promise(async (res, rej) => {
- // Get 'game_id' parameter
- const [gameId, gameIdErr] = $(params.game_id).id().$;
- if (gameIdErr) return rej('invalid game_id param');
+ // Get 'gameId' parameter
+ const [gameId, gameIdErr] = $(params.gameId).id().$;
+ if (gameIdErr) return rej('invalid gameId param');
- const game = await Game.findOne({ _id: gameId });
+ const game = await OthelloGame.findOne({ _id: gameId });
if (game == null) {
return rej('game not found');
}
const o = new Othello(game.settings.map, {
- isLlotheo: game.settings.is_llotheo,
- canPutEverywhere: game.settings.can_put_everywhere,
- loopedBoard: game.settings.looped_board
+ isLlotheo: game.settings.isLlotheo,
+ canPutEverywhere: game.settings.canPutEverywhere,
+ loopedBoard: game.settings.loopedBoard
});
game.logs.forEach(log => {