diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-07 18:56:55 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-07 18:56:55 +0900 |
| commit | a53874edc265f6cd1aab54dbbbfcd996e81aec17 (patch) | |
| tree | 42914bfbf9a50817da08e5e64fd9e8cf8206e099 /src/api/endpoints/othello/games.ts | |
| parent | wip (diff) | |
| download | sharkey-a53874edc265f6cd1aab54dbbbfcd996e81aec17.tar.gz sharkey-a53874edc265f6cd1aab54dbbbfcd996e81aec17.tar.bz2 sharkey-a53874edc265f6cd1aab54dbbbfcd996e81aec17.zip | |
wip
Diffstat (limited to 'src/api/endpoints/othello/games.ts')
| -rw-r--r-- | src/api/endpoints/othello/games.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api/endpoints/othello/games.ts b/src/api/endpoints/othello/games.ts index da85de1c1f..39963fcd29 100644 --- a/src/api/endpoints/othello/games.ts +++ b/src/api/endpoints/othello/games.ts @@ -15,7 +15,11 @@ module.exports = (params, user) => new Promise(async (res, rej) => { } : {}; // Fetch games - const games = await Game.find(q); + const games = await Game.find(q, { + sort: { + _id: -1 + } + }); // Reponse res(Promise.all(games.map(async (g) => await pack(g, user)))); |