From 6c495268aec2d2fa02ac16dbc119fb9c4e34cdae Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 7 Mar 2018 11:40:40 +0900 Subject: wip --- src/api/models/othello-session.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/api/models/othello-session.ts (limited to 'src/api/models/othello-session.ts') diff --git a/src/api/models/othello-session.ts b/src/api/models/othello-session.ts deleted file mode 100644 index 0aa1d01e54..0000000000 --- a/src/api/models/othello-session.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as mongo from 'mongodb'; -import deepcopy = require('deepcopy'); -import db from '../../db/mongodb'; - -const Session = db.get('othello_sessions'); -export default Session; - -export interface ISession { - _id: mongo.ObjectID; - code: string; - user_id: mongo.ObjectID; -} - -/** - * Pack an othello session for API response - * - * @param {any} session - * @return {Promise} - */ -export const pack = ( - session: any -) => new Promise(async (resolve, reject) => { - - const _session = deepcopy(session); - - delete _session._id; - - resolve(_session); -}); -- cgit v1.2.3-freya