diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-12 07:31:19 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-12 07:31:19 +0900 |
| commit | c68ca7f032532384131ec3affffc8aab9206b0b7 (patch) | |
| tree | 846e8b4f2f199625154f630f18fc0c257cb55a75 /src/api/endpoints/users/recommendation.ts | |
| parent | #268 (diff) | |
| download | sharkey-c68ca7f032532384131ec3affffc8aab9206b0b7.tar.gz sharkey-c68ca7f032532384131ec3affffc8aab9206b0b7.tar.bz2 sharkey-c68ca7f032532384131ec3affffc8aab9206b0b7.zip | |
[API] Beef up the recommendation algorithm
Diffstat (limited to 'src/api/endpoints/users/recommendation.ts')
| -rw-r--r-- | src/api/endpoints/users/recommendation.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/endpoints/users/recommendation.ts b/src/api/endpoints/users/recommendation.ts index 7f5e0b5f5c..a096261e58 100644 --- a/src/api/endpoints/users/recommendation.ts +++ b/src/api/endpoints/users/recommendation.ts @@ -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, |