From ce0f6f7ebe7aea9186eefb385733686f8434aafb Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 2 Aug 2018 09:30:57 +0900 Subject: [PATCH] =?UTF-8?q?type=E6=8C=87=E5=AE=9A=E5=BB=83=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/i/notifications.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/server/api/endpoints/i/notifications.ts b/src/server/api/endpoints/i/notifications.ts index a5f3d23f2..46242b9d9 100644 --- a/src/server/api/endpoints/i/notifications.ts +++ b/src/server/api/endpoints/i/notifications.ts @@ -19,10 +19,6 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) = const [markAsRead = true, markAsReadErr] = $.bool.optional.get(params.markAsRead); if (markAsReadErr) return rej('invalid markAsRead param'); - // Get 'type' parameter - const [type, typeErr] = $.arr($.str).optional.unique().get(params.type); - if (typeErr) return rej('invalid type param'); - // Get 'limit' parameter const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit); if (limitErr) return rej('invalid limit param'); @@ -68,12 +64,6 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) = }); } - if (type) { - query.type = { - $in: type - }; - } - if (sinceId) { sort._id = 1; query._id = {