summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/othello/games/show.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-24 18:13:06 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-24 18:13:06 +0900
commit7602e8f9383be37c0f7d9359f862c366b7f2fa00 (patch)
tree013dc2467b4a2e028371d4cf94f42a138d2eb4d5 /src/server/api/endpoints/othello/games/show.ts
parentBetter japanese (diff)
downloadmisskey-7602e8f9383be37c0f7d9359f862c366b7f2fa00.tar.gz
misskey-7602e8f9383be37c0f7d9359f862c366b7f2fa00.tar.bz2
misskey-7602e8f9383be37c0f7d9359f862c366b7f2fa00.zip
cafy 5.xに移行
Diffstat (limited to 'src/server/api/endpoints/othello/games/show.ts')
-rw-r--r--src/server/api/endpoints/othello/games/show.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/api/endpoints/othello/games/show.ts b/src/server/api/endpoints/othello/games/show.ts
index dd886936d4..d76c6556a2 100644
--- a/src/server/api/endpoints/othello/games/show.ts
+++ b/src/server/api/endpoints/othello/games/show.ts
@@ -1,10 +1,10 @@
-import $ from 'cafy';
+import $ from 'cafy'; import ID from '../../../../../cafy-id';
import OthelloGame, { pack } from '../../../../../models/othello-game';
import Othello from '../../../../../othello/core';
module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'gameId' parameter
- const [gameId, gameIdErr] = $(params.gameId).id().$;
+ const [gameId, gameIdErr] = $(params.gameId).type(ID).$;
if (gameIdErr) return rej('invalid gameId param');
const game = await OthelloGame.findOne({ _id: gameId });