summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorsyuilo⭐️ <Syuilotan@yahoo.co.jp>2017-03-09 03:59:12 +0900
committerGitHub <noreply@github.com>2017-03-09 03:59:12 +0900
commita2ca8eba806ffb587fd8cc6e96fbab83f92d15c8 (patch)
treeac62e068289bf0740f590c90d65901aad24cbc74 /src/api
parent:v: (diff)
downloadsharkey-a2ca8eba806ffb587fd8cc6e96fbab83f92d15c8.tar.gz
sharkey-a2ca8eba806ffb587fd8cc6e96fbab83f92d15c8.tar.bz2
sharkey-a2ca8eba806ffb587fd8cc6e96fbab83f92d15c8.zip
Update create.ts
Diffstat (limited to 'src/api')
-rw-r--r--src/api/endpoints/posts/create.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts
index 4cb60705af..e220e51b6a 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');