aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users/index.ts')
-rw-r--r--server/controllers/api/users/index.ts16
1 files changed, 3 insertions, 13 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts
index a299167e8..d1163900b 100644
--- a/server/controllers/api/users/index.ts
+++ b/server/controllers/api/users/index.ts
@@ -267,15 +267,9 @@ async function updateUser (req: express.Request, res: express.Response, next: ex
267 const user = await userToUpdate.save() 267 const user = await userToUpdate.save()
268 268
269 // Destroy user token to refresh rights 269 // Destroy user token to refresh rights
270 if (roleChanged) { 270 if (roleChanged) await OAuthTokenModel.deleteUserToken(userToUpdate.id)
271 await OAuthTokenModel.deleteUserToken(userToUpdate.id)
272 }
273 271
274 auditLogger.update( 272 auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView)
275 getAuditIdFromRes(res),
276 new UserAuditView(user.toFormattedJSON()),
277 oldUserAuditView
278 )
279 273
280 // Don't need to send this update to followers, these attributes are not propagated 274 // Don't need to send this update to followers, these attributes are not propagated
281 275
@@ -343,9 +337,5 @@ async function changeUserBlock (res: express.Response, user: UserModel, block: b
343 337
344 await Emailer.Instance.addUserBlockJob(user, block, reason) 338 await Emailer.Instance.addUserBlockJob(user, block, reason)
345 339
346 auditLogger.update( 340 auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView)
347 getAuditIdFromRes(res),
348 new UserAuditView(user.toFormattedJSON()),
349 oldUserAuditView
350 )
351} 341}