アカウント削除時にサインイン履歴も削除するように

This commit is contained in:
syuilo 2019-02-21 01:49:00 +09:00
parent 922a657c7e
commit 372138dfea
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -4,6 +4,7 @@ import User from '../../../../models/user';
import define from '../../define'; import define from '../../define';
import { createDeleteNotesJob, createDeleteDriveFilesJob } from '../../../../queue'; import { createDeleteNotesJob, createDeleteDriveFilesJob } from '../../../../queue';
import Message from '../../../../models/messaging-message'; import Message from '../../../../models/messaging-message';
import Signin from '../../../../models/signin';
export const meta = { export const meta = {
requireCredential: true, requireCredential: true,
@ -44,6 +45,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
}); });
Message.remove({ userId: user._id }); Message.remove({ userId: user._id });
Signin.remove({ userId: user._id });
createDeleteNotesJob(user); createDeleteNotesJob(user);
createDeleteDriveFilesJob(user); createDeleteDriveFilesJob(user);