wip
This commit is contained in:
@ -18,6 +18,7 @@ import DriveFolder, { deleteDriveFolder } from './drive-folder';
|
||||
import PollVote, { deletePollVote } from './poll-vote';
|
||||
import FollowingLog, { deleteFollowingLog } from './following-log';
|
||||
import FollowedLog, { deleteFollowedLog } from './followed-log';
|
||||
import SwSubscription, { deleteSwSubscription } from './sw-subscription';
|
||||
|
||||
const User = db.get<IUser>('users');
|
||||
|
||||
@ -239,6 +240,11 @@ export async function deleteUser(user: string | mongo.ObjectID | IUser) {
|
||||
await FollowedLog.find({ userId: u._id })
|
||||
).map(x => deleteFollowedLog(x)));
|
||||
|
||||
// このユーザーのSwSubscriptionをすべて削除
|
||||
await Promise.all((
|
||||
await SwSubscription.find({ userId: u._id })
|
||||
).map(x => deleteSwSubscription(x)));
|
||||
|
||||
// このユーザーを削除
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user