From c2615032012a3d6c69635dbe16a82f61864fd755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?syuilo=E2=AD=90=EF=B8=8F?= Date: Thu, 9 Mar 2017 03:59:12 +0900 Subject: [PATCH] Update create.ts --- src/api/endpoints/posts/create.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts index 4cb60705a..e220e51b6 100644 --- a/src/api/endpoints/posts/create.ts +++ b/src/api/endpoints/posts/create.ts @@ -121,7 +121,7 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => { } // Get 'poll' parameter - const [poll, pollErr] = $(params.poll).optional.object() + const [poll, pollErr] = $(params.poll).optional.strict.object() .have('choices', $().array('string') .unique() .range(2, 10) @@ -221,7 +221,7 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => { addMention(inReplyToPost.user_id, 'reply'); } - // If $ is repost + // If it is repost if (repost) { // Notify const type = text ? 'quote' : 'repost'; @@ -229,7 +229,7 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => { post_id: post._id }); - // If $ is quote repost + // If it is quote repost if (text) { // Add mention addMention(repost.user_id, 'quote');