diff options
Diffstat (limited to 'server/controllers/api/users/index.ts')
-rw-r--r-- | server/controllers/api/users/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index d743a9912..c3190e731 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts | |||
@@ -305,10 +305,10 @@ async function listUsers (req: express.Request, res: express.Response) { | |||
305 | async function removeUser (req: express.Request, res: express.Response) { | 305 | async function removeUser (req: express.Request, res: express.Response) { |
306 | const user = res.locals.user | 306 | const user = res.locals.user |
307 | 307 | ||
308 | await user.destroy() | ||
309 | |||
310 | auditLogger.delete(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON())) | 308 | auditLogger.delete(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON())) |
311 | 309 | ||
310 | await user.destroy() | ||
311 | |||
312 | Hooks.runAction('action:api.user.deleted', { user }) | 312 | Hooks.runAction('action:api.user.deleted', { user }) |
313 | 313 | ||
314 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) | 314 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) |