summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/othello/match.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/othello/match.ts')
-rw-r--r--src/server/api/endpoints/othello/match.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/api/endpoints/othello/match.ts b/src/server/api/endpoints/othello/match.ts
index d9274f8f9c..e70e579755 100644
--- a/src/server/api/endpoints/othello/match.ts
+++ b/src/server/api/endpoints/othello/match.ts
@@ -1,4 +1,4 @@
-import $ from 'cafy';
+import $ from 'cafy'; import ID from '../../../../cafy-id';
import Matching, { pack as packMatching } from '../../../../models/othello-matching';
import OthelloGame, { pack as packGame } from '../../../../models/othello-game';
import User from '../../../../models/user';
@@ -7,7 +7,7 @@ import { eighteight } from '../../../../othello/maps';
module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'userId' parameter
- const [childId, childIdErr] = $(params.userId).id().$;
+ const [childId, childIdErr] = $.type(ID).get(params.userId);
if (childIdErr) return rej('invalid userId param');
// Myself