From c26b5fe05794d6f24d3db91b2acecade81984d93 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 28 Mar 2018 17:02:02 +0900 Subject: [PATCH] wip --- src/api/endpoints/posts/search.ts | 12 ++++++------ src/api/models/post.ts | 2 +- src/web/app/common/scripts/parse-search-query.ts | 2 +- src/web/app/desktop/views/components/post-detail.vue | 2 +- src/web/app/desktop/views/components/posts.post.vue | 2 +- src/web/app/mobile/views/components/post-detail.vue | 2 +- src/web/app/mobile/views/components/post.vue | 2 +- src/web/docs/api/entities/post.yaml | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/api/endpoints/posts/search.ts b/src/api/endpoints/posts/search.ts index 5c324bfe9a..bb5c438926 100644 --- a/src/api/endpoints/posts/search.ts +++ b/src/api/endpoints/posts/search.ts @@ -25,17 +25,17 @@ module.exports = (params, me) => new Promise(async (res, rej) => { const [includeUserIds = [], includeUserIdsErr] = $(params.includeUserIds).optional.array('id').$; if (includeUserIdsErr) return rej('invalid includeUserIds param'); - // Get 'exclude_userIds' parameter - const [excludeUserIds = [], excludeUserIdsErr] = $(params.exclude_userIds).optional.array('id').$; - if (excludeUserIdsErr) return rej('invalid exclude_userIds param'); + // Get 'excludeUserIds' parameter + const [excludeUserIds = [], excludeUserIdsErr] = $(params.excludeUserIds).optional.array('id').$; + if (excludeUserIdsErr) return rej('invalid excludeUserIds param'); // Get 'includeUserUsernames' parameter const [includeUserUsernames = [], includeUserUsernamesErr] = $(params.includeUserUsernames).optional.array('string').$; if (includeUserUsernamesErr) return rej('invalid includeUserUsernames param'); - // Get 'exclude_userUsernames' parameter - const [excludeUserUsernames = [], excludeUserUsernamesErr] = $(params.exclude_userUsernames).optional.array('string').$; - if (excludeUserUsernamesErr) return rej('invalid exclude_userUsernames param'); + // Get 'excludeUserUsernames' parameter + const [excludeUserUsernames = [], excludeUserUsernamesErr] = $(params.excludeUserUsernames).optional.array('string').$; + if (excludeUserUsernamesErr) return rej('invalid excludeUserUsernames param'); // Get 'following' parameter const [following = null, followingErr] = $(params.following).optional.nullable.boolean().$; diff --git a/src/api/models/post.ts b/src/api/models/post.ts index 4f7729fbe8..7a93753f74 100644 --- a/src/api/models/post.ts +++ b/src/api/models/post.ts @@ -197,7 +197,7 @@ export const pack = async ( // Fetch my reaction if (meId) { - _post.my_reaction = (async () => { + _post.myReaction = (async () => { const reaction = await Reaction .findOne({ userId: meId, diff --git a/src/web/app/common/scripts/parse-search-query.ts b/src/web/app/common/scripts/parse-search-query.ts index 81444c8b01..4f09d2b93f 100644 --- a/src/web/app/common/scripts/parse-search-query.ts +++ b/src/web/app/common/scripts/parse-search-query.ts @@ -11,7 +11,7 @@ export default function(qs: string) { q['includeUserUsernames'] = value.split(','); break; case 'exclude_user': - q['exclude_userUsernames'] = value.split(','); + q['excludeUserUsernames'] = value.split(','); break; case 'follow': q['following'] = value == 'null' ? null : value == 'true'; diff --git a/src/web/app/desktop/views/components/post-detail.vue b/src/web/app/desktop/views/components/post-detail.vue index 3f62c0d598..7783ec62c7 100644 --- a/src/web/app/desktop/views/components/post-detail.vue +++ b/src/web/app/desktop/views/components/post-detail.vue @@ -61,7 +61,7 @@ - - - -