Fix parameter name

This commit is contained in:
syuilo 2018-09-05 19:35:57 +09:00
parent a1b82e9723
commit 37058e3480
1 changed files with 5 additions and 5 deletions

View File

@ -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); const [renote = null, renoteErr] = $.bool.optional.nullable.get(params.renote);
if (renoteErr) return rej('invalid renote param'); if (renoteErr) return rej('invalid renote param');
// Get 'media' parameter // Get 'withFiles' parameter
const [media = null, mediaErr] = $.bool.optional.nullable.get(params.media); const [withFiles = null, withFilesErr] = $.bool.optional.nullable.get(params.withFiles);
if (mediaErr) return rej('invalid media param'); if (withFilesErr) return rej('invalid withFiles param');
// Get 'poll' parameter // Get 'poll' parameter
const [poll = null, pollErr] = $.bool.optional.nullable.get(params.poll); 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 (withFiles != null) {
if (media) { if (withFiles) {
push({ push({
fileIds: { fileIds: {
$exists: true, $exists: true,