mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 05:03:07 +02:00
[API] Beef up the recommendation algorithm
This commit is contained in:
parent
0fc99341b6
commit
c68ca7f032
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
/**
|
||||
* 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,
|
||||
|
|
Loading…
Reference in a new issue