diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-07-05 23:36:07 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-07-05 23:36:07 +0900 |
| commit | 11439afde76015b80e8d2e680808161cbc1800d5 (patch) | |
| tree | 8888a7c3f9a209b57ca2ebd327e624a69f0b2130 /src/server/api/endpoints/drive/stream.ts | |
| parent | wip (diff) | |
| download | misskey-11439afde76015b80e8d2e680808161cbc1800d5.tar.gz misskey-11439afde76015b80e8d2e680808161cbc1800d5.tar.bz2 misskey-11439afde76015b80e8d2e680808161cbc1800d5.zip | |
wip
Diffstat (limited to 'src/server/api/endpoints/drive/stream.ts')
| -rw-r--r-- | src/server/api/endpoints/drive/stream.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index 515f74645a..612d922c6b 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -7,15 +7,15 @@ import { ILocalUser } from '../../../../models/user'; */ module.exports = (params: any, user: ILocalUser) => new Promise(async (res, rej) => { // Get 'limit' parameter - const [limit = 10, limitErr] = $.num.optional().range(1, 100).get(params.limit); + const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit); if (limitErr) return rej('invalid limit param'); // Get 'sinceId' parameter - const [sinceId, sinceIdErr] = $.type(ID).optional().get(params.sinceId); + const [sinceId, sinceIdErr] = $.type(ID).optional.get(params.sinceId); if (sinceIdErr) return rej('invalid sinceId param'); // Get 'untilId' parameter - const [untilId, untilIdErr] = $.type(ID).optional().get(params.untilId); + const [untilId, untilIdErr] = $.type(ID).optional.get(params.untilId); if (untilIdErr) return rej('invalid untilId param'); // Check if both of sinceId and untilId is specified @@ -24,7 +24,7 @@ module.exports = (params: any, user: ILocalUser) => new Promise(async (res, rej) } // Get 'type' parameter - const [type, typeErr] = $.str.optional().match(/^[a-zA-Z\/\-\*]+$/).get(params.type); + const [type, typeErr] = $.str.optional.match(/^[a-zA-Z\/\-\*]+$/).get(params.type); if (typeErr) return rej('invalid type param'); // Construct query |