From b87e7e50b6c1064319564b459f4456a3bb83da72 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Jun 2018 13:49:53 +0900 Subject: [PATCH] Clean up --- src/server/api/endpoints/hashtags/trend.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/api/endpoints/hashtags/trend.ts b/src/server/api/endpoints/hashtags/trend.ts index 07317d1db2..faf4e582fa 100644 --- a/src/server/api/endpoints/hashtags/trend.ts +++ b/src/server/api/endpoints/hashtags/trend.ts @@ -3,7 +3,7 @@ import Note from '../../../../models/note'; /** * Get trends of hashtags */ -module.exports = (params, user) => new Promise(async (res, rej) => { +module.exports = () => new Promise(async (res, rej) => { const data = await Note.aggregate([{ $match: { createdAt: { @@ -58,7 +58,6 @@ module.exports = (params, user) => new Promise(async (res, rej) => { const interval = 1000 * 60 * 10; for (let i = 0; i < range; i++) { - countPromises.push(Promise.all(hots.map(tag => Note.distinct('userId', { tags: tag, createdAt: {