Resolve conflicts

This commit is contained in:
syuilo 2018-03-29 14:48:47 +09:00
parent 281b388e39
commit bfc193d8cd
308 changed files with 3045 additions and 3200 deletions

View file

@ -1,8 +1,16 @@
import * as mongo from 'mongodb';
import db from '../../../db/mongodb';
const collection = db.get('access_tokens');
const AccessToken = db.get<IAccessTokens>('accessTokens');
AccessToken.createIndex('token');
AccessToken.createIndex('hash');
export default AccessToken;
(collection as any).createIndex('token'); // fuck type definition
(collection as any).createIndex('hash'); // fuck type definition
export default collection as any; // fuck type definition
export type IAccessTokens = {
_id: mongo.ObjectID;
createdAt: Date;
appId: mongo.ObjectID;
userId: mongo.ObjectID;
token: string;
hash: string;
};