diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-09-17 11:43:53 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-09-17 11:43:53 +0900 |
| commit | 67ec10e86d6b73b62dc35e243c73be12c6bb50ad (patch) | |
| tree | 99fb278fa47c20eb24fe7013d509318ce9e36262 /src | |
| parent | pong (diff) | |
| download | sharkey-67ec10e86d6b73b62dc35e243c73be12c6bb50ad.tar.gz sharkey-67ec10e86d6b73b62dc35e243c73be12c6bb50ad.tar.bz2 sharkey-67ec10e86d6b73b62dc35e243c73be12c6bb50ad.zip | |
Add untilId param
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/api/endpoints/notes/search_by_tag.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/server/api/endpoints/notes/search_by_tag.ts b/src/server/api/endpoints/notes/search_by_tag.ts index 7beb97aec6..0703210017 100644 --- a/src/server/api/endpoints/notes/search_by_tag.ts +++ b/src/server/api/endpoints/notes/search_by_tag.ts @@ -87,6 +87,12 @@ export const meta = { } }), + untilId: $.type(ID).optional.note({ + desc: { + 'ja-JP': '指定すると、この投稿を基点としてより古い投稿を取得します' + } + }), + sinceDate: $.num.optional.note({ }), @@ -318,6 +324,14 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => } } + if (ps.untilId) { + push({ + _id: { + $lt: ps.untilId + } + }); + } + if (ps.sinceDate) { push({ createdAt: { |