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/notes/timeline.ts | |
| parent | :art: (diff) | |
| download | sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.gz sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.bz2 sharkey-a1b82e97230eab994c06fc7c902e71539664d3d7.zip | |
#2620
Diffstat (limited to 'src/server/api/endpoints/notes/timeline.ts')
| -rw-r--r-- | src/server/api/endpoints/notes/timeline.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/api/endpoints/notes/timeline.ts b/src/server/api/endpoints/notes/timeline.ts index 099bf2010b..145f648c56 100644 --- a/src/server/api/endpoints/notes/timeline.ts +++ b/src/server/api/endpoints/notes/timeline.ts @@ -67,7 +67,7 @@ export const meta = { } }), - mediaOnly: $.bool.optional.note({ + withFiles: $.bool.optional.note({ desc: { 'ja-JP': 'true にすると、メディアが添付された投稿だけ取得します' } @@ -154,7 +154,7 @@ export default async (params: any, user: ILocalUser) => { }, { text: { $ne: null } }, { - mediaIds: { $ne: [] } + fileIds: { $ne: [] } }, { poll: { $ne: null } }] @@ -170,7 +170,7 @@ export default async (params: any, user: ILocalUser) => { }, { text: { $ne: null } }, { - mediaIds: { $ne: [] } + fileIds: { $ne: [] } }, { poll: { $ne: null } }] @@ -186,16 +186,16 @@ export default async (params: any, user: ILocalUser) => { }, { text: { $ne: null } }, { - mediaIds: { $ne: [] } + fileIds: { $ne: [] } }, { poll: { $ne: null } }] }); } - if (ps.mediaOnly) { + if (ps.withFiles) { query.$and.push({ - mediaIds: { $exists: true, $ne: [] } + fileIds: { $exists: true, $ne: [] } }); } |