forked from FoundKeyGang/FoundKey
Clean up
This commit is contained in:
parent
36215d50bd
commit
b87e7e50b6
1 changed files with 1 additions and 2 deletions
|
@ -3,7 +3,7 @@ import Note from '../../../../models/note';
|
||||||
/**
|
/**
|
||||||
* Get trends of hashtags
|
* 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([{
|
const data = await Note.aggregate([{
|
||||||
$match: {
|
$match: {
|
||||||
createdAt: {
|
createdAt: {
|
||||||
|
@ -58,7 +58,6 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||||
const interval = 1000 * 60 * 10;
|
const interval = 1000 * 60 * 10;
|
||||||
|
|
||||||
for (let i = 0; i < range; i++) {
|
for (let i = 0; i < range; i++) {
|
||||||
|
|
||||||
countPromises.push(Promise.all(hots.map(tag => Note.distinct('userId', {
|
countPromises.push(Promise.all(hots.map(tag => Note.distinct('userId', {
|
||||||
tags: tag,
|
tags: tag,
|
||||||
createdAt: {
|
createdAt: {
|
||||||
|
|
Loading…
Reference in a new issue