diff options
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r-- | server/controllers/api/users/index.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/users/my-subscriptions.ts | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index 5a5a12e82..96366d68c 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts | |||
@@ -309,7 +309,7 @@ async function changeUserBlock (res: express.Response, user: MUserAccountDefault | |||
309 | await user.save({ transaction: t }) | 309 | await user.save({ transaction: t }) |
310 | }) | 310 | }) |
311 | 311 | ||
312 | await Emailer.Instance.addUserBlockJob(user, block, reason) | 312 | Emailer.Instance.addUserBlockJob(user, block, reason) |
313 | 313 | ||
314 | auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView) | 314 | auditLogger.update(getAuditIdFromRes(res), new UserAuditView(user.toFormattedJSON()), oldUserAuditView) |
315 | } | 315 | } |
diff --git a/server/controllers/api/users/my-subscriptions.ts b/server/controllers/api/users/my-subscriptions.ts index a750f9bd1..6c64e99a7 100644 --- a/server/controllers/api/users/my-subscriptions.ts +++ b/server/controllers/api/users/my-subscriptions.ts | |||
@@ -138,7 +138,9 @@ async function deleteUserSubscription (req: express.Request, res: express.Respon | |||
138 | const subscription = res.locals.subscription | 138 | const subscription = res.locals.subscription |
139 | 139 | ||
140 | await sequelizeTypescript.transaction(async t => { | 140 | await sequelizeTypescript.transaction(async t => { |
141 | if (subscription.state === 'accepted') await sendUndoFollow(subscription, t) | 141 | if (subscription.state === 'accepted') { |
142 | sendUndoFollow(subscription, t) | ||
143 | } | ||
142 | 144 | ||
143 | return subscription.destroy({ transaction: t }) | 145 | return subscription.destroy({ transaction: t }) |
144 | }) | 146 | }) |