1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-28 06:48:32 +09:00
This commit is contained in:
syuilo 2018-06-11 13:49:53 +09:00
parent 36215d50bd
commit b87e7e50b6

View File

@ -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: {