mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 15:43:07 +02:00
16 lines
375 B
TypeScript
16 lines
375 B
TypeScript
import * as mongo from 'mongodb';
|
|
import db from '../db/mongodb';
|
|
|
|
const AccessToken = db.get<IAccessTokens>('accessTokens');
|
|
AccessToken.createIndex('token');
|
|
AccessToken.createIndex('hash');
|
|
export default AccessToken;
|
|
|
|
export type IAccessTokens = {
|
|
_id: mongo.ObjectID;
|
|
createdAt: Date;
|
|
appId: mongo.ObjectID;
|
|
userId: mongo.ObjectID;
|
|
token: string;
|
|
hash: string;
|
|
};
|