diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-09-05 19:32:46 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-09-05 19:32:46 +0900 |
| commit | a1b82e97230eab994c06fc7c902e71539664d3d7 (patch) | |
| tree | 18501f85f8d406777a3c11ef1d938657c256b32f /src/server/api/endpoints/users/notes.ts | |
| parent | :art: (diff) | |
| download | sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.gz sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.bz2 sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.zip | |
#2620
Diffstat (limited to 'src/server/api/endpoints/users/notes.ts')
| -rw-r--r-- | src/server/api/endpoints/users/notes.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/api/endpoints/users/notes.ts b/src/server/api/endpoints/users/notes.ts index ff7855bde0..d894e52dba 100644 --- a/src/server/api/endpoints/users/notes.ts +++ b/src/server/api/endpoints/users/notes.ts @@ -27,9 +27,9 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => const [includeReplies = true, includeRepliesErr] = $.bool.optional.get(params.includeReplies); if (includeRepliesErr) return rej('invalid includeReplies param'); - // Get 'withMedia' parameter - const [withMedia = false, withMediaErr] = $.bool.optional.get(params.withMedia); - if (withMediaErr) return rej('invalid withMedia param'); + // Get 'withFiles' parameter + const [withFiles = false, withFilesErr] = $.bool.optional.get(params.withFiles); + if (withFilesErr) return rej('invalid withFiles param'); // Get 'limit' parameter const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit); @@ -104,8 +104,8 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => query.replyId = null; } - if (withMedia) { - query.mediaIds = { + if (withFiles) { + query.fileIds = { $exists: true, $ne: [] }; |