monkeeShark/src/server/api/endpoints/games/reversi/match/cancel.ts
2018-07-17 04:36:44 +09:00

14 lines
332 B
TypeScript

import Matching from '../../../../../../models/games/reversi/matching';
import { ILocalUser } from '../../../../../../models/user';
export const meta = {
requireCredential: true
};
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
await Matching.remove({
parentId: user._id
});
res();
});