diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-09 18:29:27 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-09 18:29:27 +0900 |
| commit | e82268db7ee9863b2eaeea64f843afa091b024f8 (patch) | |
| tree | 0f88d55d7f9bf3e1d3a4a91aafdd972af87117af /src/api/endpoints/othello/games.ts | |
| parent | なんかもうめっちゃ変えた (diff) | |
| download | sharkey-e82268db7ee9863b2eaeea64f843afa091b024f8.tar.gz sharkey-e82268db7ee9863b2eaeea64f843afa091b024f8.tar.bz2 sharkey-e82268db7ee9863b2eaeea64f843afa091b024f8.zip | |
:v:
Diffstat (limited to 'src/api/endpoints/othello/games.ts')
| -rw-r--r-- | src/api/endpoints/othello/games.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/endpoints/othello/games.ts b/src/api/endpoints/othello/games.ts index dd3ee523a8..2a6bbb4043 100644 --- a/src/api/endpoints/othello/games.ts +++ b/src/api/endpoints/othello/games.ts @@ -23,7 +23,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { return rej('cannot set since_id and until_id'); } - const q = my ? { + const q: any = my ? { is_started: true, $or: [{ user1_id: user._id @@ -34,7 +34,6 @@ module.exports = (params, user) => new Promise(async (res, rej) => { is_started: true }; - const sort = { _id: -1 }; @@ -52,7 +51,8 @@ module.exports = (params, user) => new Promise(async (res, rej) => { // Fetch games const games = await Game.find(q, { - sort + sort, + limit }); // Reponse |