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:
parent
afd4ee86dd
commit
2dbc170da3
3 changed files with 11 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue