1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Add missing audit log if the user deletes its account

This commit is contained in:
Chocobozzz 2021-01-04 09:54:48 +01:00
parent afd4ee86dd
commit 2dbc170da3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 11 additions and 4 deletions

View file

@ -305,10 +305,10 @@ async function listUsers (req: express.Request, res: express.Response) {
async function removeUser (req: express.Request, res: express.Response) {
const user = res.locals.user
await user.destroy()
auditLogger.delete(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()))
await user.destroy()
Hooks.runAction('action:api.user.deleted', { user })
return res.sendStatus(HttpStatusCode.NO_CONTENT_204)