Skip to content
Snippets Groups Projects
Commit c68ca7f0 authored by syuilo's avatar syuilo
Browse files

[API] Beef up the recommendation algorithm

parent 0fc99341
No related branches found
No related tags found
No related merge requests found
/**
* Module dependencies
*/
const ms = require('ms');
import $ from 'cafy';
import User from '../../models/user';
import serialize from '../../serializers/user';
......@@ -29,6 +30,9 @@ module.exports = (params, me) => new Promise(async (res, rej) => {
.find({
_id: {
$nin: followingIds
},
last_used_at: {
$gte: new Date(Date.now() - ms('7days'))
}
}, {
limit: limit,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment