diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-15 06:31:22 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-15 06:31:22 +0900 |
| commit | 414cac49c3ee4a6d81211b33ee13926b06e7c200 (patch) | |
| tree | 35615b0449cb9fb5f60adcee191c01ff26912e33 /src/server/api/endpoints | |
| parent | Add featured page (diff) | |
| download | sharkey-414cac49c3ee4a6d81211b33ee13926b06e7c200.tar.gz sharkey-414cac49c3ee4a6d81211b33ee13926b06e7c200.tar.bz2 sharkey-414cac49c3ee4a6d81211b33ee13926b06e7c200.zip | |
Improve featured api
Diffstat (limited to 'src/server/api/endpoints')
| -rw-r--r-- | src/server/api/endpoints/notes/featured.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/api/endpoints/notes/featured.ts b/src/server/api/endpoints/notes/featured.ts index 371d822127..5d3404f1d6 100644 --- a/src/server/api/endpoints/notes/featured.ts +++ b/src/server/api/endpoints/notes/featured.ts @@ -23,7 +23,7 @@ export const meta = { }; export default define(meta, (ps, user) => new Promise(async (res, rej) => { - const day = 1000 * 60 * 60 * 24; + const day = 1000 * 60 * 60 * 24 * 2; const notes = await Note .find({ @@ -31,7 +31,8 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { $gt: new Date(Date.now() - day) }, deletedAt: null, - visibility: { $in: ['public', 'home'] } + visibility: { $in: ['public', 'home'] }, + '_user.host': null }, { limit: ps.limit, sort: { |