From 37058e3480041a922ac5c193e4cc3bc29fd663ae Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 5 Sep 2018 19:35:57 +0900 Subject: [PATCH] Fix parameter name --- src/server/api/endpoints/notes/search_by_tag.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/api/endpoints/notes/search_by_tag.ts b/src/server/api/endpoints/notes/search_by_tag.ts index 317a0726d3..f982dc01e9 100644 --- a/src/server/api/endpoints/notes/search_by_tag.ts +++ b/src/server/api/endpoints/notes/search_by_tag.ts @@ -45,9 +45,9 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => const [renote = null, renoteErr] = $.bool.optional.nullable.get(params.renote); if (renoteErr) return rej('invalid renote param'); - // Get 'media' parameter - const [media = null, mediaErr] = $.bool.optional.nullable.get(params.media); - if (mediaErr) return rej('invalid media param'); + // Get 'withFiles' parameter + const [withFiles = null, withFilesErr] = $.bool.optional.nullable.get(params.withFiles); + if (withFilesErr) return rej('invalid withFiles param'); // Get 'poll' parameter const [poll = null, pollErr] = $.bool.optional.nullable.get(params.poll); @@ -244,8 +244,8 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => } } - if (media != null) { - if (media) { + if (withFiles != null) { + if (withFiles) { push({ fileIds: { $exists: true,