アカウント削除時にメッセージも削除するように
This commit is contained in:
parent
3409a51cca
commit
922a657c7e
|
@ -3,6 +3,7 @@ import * as bcrypt from 'bcryptjs';
|
||||||
import User from '../../../../models/user';
|
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';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
|
@ -42,6 +43,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Message.remove({ userId: user._id });
|
||||||
createDeleteNotesJob(user);
|
createDeleteNotesJob(user);
|
||||||
createDeleteDriveFilesJob(user);
|
createDeleteDriveFilesJob(user);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue