From f664cf09c0860e0cf9920722532c6315fa35a8a1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 2 May 2018 18:06:16 +0900 Subject: Update cafy to 8.0.0 :rocket: --- src/server/api/endpoints/notes/reactions/create.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/api/endpoints/notes/reactions/create.ts') diff --git a/src/server/api/endpoints/notes/reactions/create.ts b/src/server/api/endpoints/notes/reactions/create.ts index 9dc1b3c82a..21757cb427 100644 --- a/src/server/api/endpoints/notes/reactions/create.ts +++ b/src/server/api/endpoints/notes/reactions/create.ts @@ -11,11 +11,11 @@ import { validateReaction } from '../../../../../models/note-reaction'; */ module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'noteId' parameter - const [noteId, noteIdErr] = $(params.noteId).type(ID).get(); + const [noteId, noteIdErr] = $.type(ID).get(params.noteId); if (noteIdErr) return rej('invalid noteId param'); // Get 'reaction' parameter - const [reaction, reactionErr] = $(params.reaction).string().pipe(validateReaction.ok).get(); + const [reaction, reactionErr] = $.str.pipe(validateReaction.ok).get(params.reaction); if (reactionErr) return rej('invalid reaction param'); // Fetch reactee -- cgit v1.2.3-freya