diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-17 08:10:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-17 08:10:54 +0900 |
| commit | 1ef66c962a1cea81dee4f5db32cd011feac7de44 (patch) | |
| tree | 006945b7ae9d437cebb0fabc5eb5a849cff518c5 /src/models | |
| parent | Add missing semicolon (diff) | |
| download | sharkey-1ef66c962a1cea81dee4f5db32cd011feac7de44.tar.gz sharkey-1ef66c962a1cea81dee4f5db32cd011feac7de44.tar.bz2 sharkey-1ef66c962a1cea81dee4f5db32cd011feac7de44.zip | |
reversi :white_flower: :100:
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/reversi-game.ts (renamed from src/models/othello-game.ts) | 12 | ||||
| -rw-r--r-- | src/models/reversi-matching.ts (renamed from src/models/othello-matching.ts) | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/models/othello-game.ts b/src/models/reversi-game.ts index 1dd375d2e5..16b9ab0d4e 100644 --- a/src/models/othello-game.ts +++ b/src/models/reversi-game.ts @@ -3,10 +3,10 @@ import * as deepcopy from 'deepcopy'; import db from '../db/mongodb'; import { IUser, pack as packUser } from './user'; -const OthelloGame = db.get<IOthelloGame>('othelloGames'); -export default OthelloGame; +const ReversiGame = db.get<IReversiGame>('reversiGames'); +export default ReversiGame; -export interface IOthelloGame { +export interface IReversiGame { _id: mongo.ObjectID; createdAt: Date; startedAt: Date; @@ -45,7 +45,7 @@ export interface IOthelloGame { } /** - * Pack an othello game for API response + * Pack an reversi game for API response */ export const pack = ( game: any, @@ -62,11 +62,11 @@ export const pack = ( // Populate the game if 'game' is ID if (mongo.ObjectID.prototype.isPrototypeOf(game)) { - _game = await OthelloGame.findOne({ + _game = await ReversiGame.findOne({ _id: game }); } else if (typeof game === 'string') { - _game = await OthelloGame.findOne({ + _game = await ReversiGame.findOne({ _id: new mongo.ObjectID(game) }); } else { diff --git a/src/models/othello-matching.ts b/src/models/reversi-matching.ts index 0efba3ae5d..5efa5d76ad 100644 --- a/src/models/othello-matching.ts +++ b/src/models/reversi-matching.ts @@ -3,7 +3,7 @@ import * as deepcopy from 'deepcopy'; import db from '../db/mongodb'; import { IUser, pack as packUser } from './user'; -const Matching = db.get<IMatching>('othelloMatchings'); +const Matching = db.get<IMatching>('reversiMatchings'); export default Matching; export interface IMatching { @@ -14,7 +14,7 @@ export interface IMatching { } /** - * Pack an othello matching for API response + * Pack an reversi matching for API response */ export const pack = ( matching: any, |