diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-08-18 05:46:57 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-08-18 05:46:57 +0900 |
| commit | 31aaf559ac7aa50190a2b783fa6c7da84ad48eeb (patch) | |
| tree | a6affb4503b8a91965cbbf6090c8875932b29f04 /src/server/api/endpoints/aggregation/users.ts | |
| parent | Fix bug (diff) | |
| download | sharkey-31aaf559ac7aa50190a2b783fa6c7da84ad48eeb.tar.gz sharkey-31aaf559ac7aa50190a2b783fa6c7da84ad48eeb.tar.bz2 sharkey-31aaf559ac7aa50190a2b783fa6c7da84ad48eeb.zip | |
Fix bug
Diffstat (limited to 'src/server/api/endpoints/aggregation/users.ts')
| -rw-r--r-- | src/server/api/endpoints/aggregation/users.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/api/endpoints/aggregation/users.ts b/src/server/api/endpoints/aggregation/users.ts index bb36fbfe46..d016484238 100644 --- a/src/server/api/endpoints/aggregation/users.ts +++ b/src/server/api/endpoints/aggregation/users.ts @@ -1,4 +1,3 @@ -import $ from 'cafy'; import User from '../../../../models/user'; export const meta = { @@ -11,8 +10,10 @@ export const meta = { */ export default (params: any) => new Promise(async (res, rej) => { const query = [{ - createdAt: { - $gt: new Date(new Date().setFullYear(new Date().getFullYear() - 1)) + $match: { + createdAt: { + $gt: new Date(new Date().setFullYear(new Date().getFullYear() - 1)) + } } }, { $project: { |