diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-07 18:45:16 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-07 18:45:16 +0900 |
| commit | 0bca0e8a02e005293663abc4a052ad8f8b2078f3 (patch) | |
| tree | 046e97207c68833a5c57f536312bea0623bc5b44 /src/api/models | |
| parent | wip (diff) | |
| download | sharkey-0bca0e8a02e005293663abc4a052ad8f8b2078f3.tar.gz sharkey-0bca0e8a02e005293663abc4a052ad8f8b2078f3.tar.bz2 sharkey-0bca0e8a02e005293663abc4a052ad8f8b2078f3.zip | |
wip
Diffstat (limited to 'src/api/models')
| -rw-r--r-- | src/api/models/othello-game.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/models/othello-game.ts b/src/api/models/othello-game.ts index b9fd94ebc0..d75baf356b 100644 --- a/src/api/models/othello-game.ts +++ b/src/api/models/othello-game.ts @@ -11,6 +11,9 @@ export interface IGame { created_at: Date; black_user_id: mongo.ObjectID; white_user_id: mongo.ObjectID; + turn_user_id: mongo.ObjectID; + is_ended: boolean; + winner_id: mongo.ObjectID; logs: any[]; } @@ -40,6 +43,7 @@ export const pack = ( // Populate user _game.black_user = await packUser(_game.black_user_id, meId); _game.white_user = await packUser(_game.white_user_id, meId); + _game.winner = await packUser(_game.winner_id, meId); resolve(_game); }); |