summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/channels/notes.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-02 18:06:16 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-02 18:06:16 +0900
commitf664cf09c0860e0cf9920722532c6315fa35a8a1 (patch)
tree119a57cf807ea105a68e14395420f8eb54ab7c5c /src/server/api/endpoints/channels/notes.ts
parentoops (diff)
downloadmisskey-f664cf09c0860e0cf9920722532c6315fa35a8a1.tar.gz
misskey-f664cf09c0860e0cf9920722532c6315fa35a8a1.tar.bz2
misskey-f664cf09c0860e0cf9920722532c6315fa35a8a1.zip
Update cafy to 8.0.0 :rocket:
Diffstat (limited to 'src/server/api/endpoints/channels/notes.ts')
-rw-r--r--src/server/api/endpoints/channels/notes.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/endpoints/channels/notes.ts b/src/server/api/endpoints/channels/notes.ts
index a83cdb34c4..463152e74a 100644
--- a/src/server/api/endpoints/channels/notes.ts
+++ b/src/server/api/endpoints/channels/notes.ts
@@ -10,15 +10,15 @@ import Note, { pack } from '../../../../models/note';
*/
module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'limit' parameter
- const [limit = 1000, limitErr] = $(params.limit).optional.number().range(1, 1000).get();
+ const [limit = 1000, limitErr] = $.num.optional().range(1, 1000).get(params.limit);
if (limitErr) return rej('invalid limit param');
// Get 'sinceId' parameter
- const [sinceId, sinceIdErr] = $(params.sinceId).optional.type(ID).get();
+ const [sinceId, sinceIdErr] = $.type(ID).optional().get(params.sinceId);
if (sinceIdErr) return rej('invalid sinceId param');
// Get 'untilId' parameter
- const [untilId, untilIdErr] = $(params.untilId).optional.type(ID).get();
+ 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
@@ -27,7 +27,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
}
// Get 'channelId' parameter
- const [channelId, channelIdErr] = $(params.channelId).type(ID).get();
+ const [channelId, channelIdErr] = $.type(ID).get(params.channelId);
if (channelIdErr) return rej('invalid channelId param');
// Fetch channel