summaryrefslogtreecommitdiff
path: root/src/api/endpoints/aggregation/users.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-04 14:52:33 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-04 14:52:33 +0900
commitbcd65d290d25219631bb47570478378a698d0fa0 (patch)
treede3630065fcddeb1916668ef3b0b43a219340e2e /src/api/endpoints/aggregation/users.ts
parentwip (diff)
downloadsharkey-bcd65d290d25219631bb47570478378a698d0fa0.tar.gz
sharkey-bcd65d290d25219631bb47570478378a698d0fa0.tar.bz2
sharkey-bcd65d290d25219631bb47570478378a698d0fa0.zip
wip
Diffstat (limited to 'src/api/endpoints/aggregation/users.ts')
-rw-r--r--src/api/endpoints/aggregation/users.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/api/endpoints/aggregation/users.ts b/src/api/endpoints/aggregation/users.ts
index 9eb2d035ec..e38ce92ff9 100644
--- a/src/api/endpoints/aggregation/users.ts
+++ b/src/api/endpoints/aggregation/users.ts
@@ -17,11 +17,14 @@ module.exports = params => new Promise(async (res, rej) => {
const users = await User
.find({}, {
- _id: false,
- created_at: true,
- deleted_at: true
- }, {
- sort: { created_at: -1 }
+ sort: {
+ _id: -1
+ },
+ fields: {
+ _id: false,
+ created_at: true,
+ deleted_at: true
+ }
});
const graph = [];