This commit is contained in:
syuilo
2018-04-24 23:34:18 +09:00
parent 070cd52c21
commit 1a13c7e0b1
8 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,6 @@
import * as mongo from 'mongodb';
import deepcopy = require('deepcopy');
import sequential = require('promise-sequential');
import rap from '@prezzemolo/rap';
import db from '../db/mongodb';
import Note, { pack as packNote, deleteNote } from './note';
@ -167,9 +168,9 @@ export async function deleteUser(user: string | mongo.ObjectID | IUser) {
).map(x => deleteAccessToken(x)));
// このユーザーのNoteをすべて削除
await Promise.all((
await Note.find({ userId: u._id })
).map(x => deleteNote(x)));
//await sequential((
// await Note.find({ userId: u._id })
//).map(x => () => deleteNote(x)));
// このユーザーのNoteReactionをすべて削除
await Promise.all((