mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 17:33:38 +00:00
Merge pull request #1814 from overleaf/spd-missing-callback-returns
Add missing return statements to callbacks in SubscriptionGroupHandler GitOrigin-RevId: 05ff67bd8e4997fde01c6cf9f4558d3caa261590
This commit is contained in:
parent
561f54c1a3
commit
6488fd1284
1 changed files with 3 additions and 2 deletions
|
@ -18,11 +18,12 @@ module.exports = SubscriptionGroupHandler =
|
|||
SubscriptionUpdater.removeUserFromGroup subscriptionId, userToRemove_id, callback
|
||||
|
||||
replaceUserReferencesInGroups: (oldId, newId, callback) ->
|
||||
logger.log old_id: oldId, new_id: newId, "replacing user reference in groups"
|
||||
Subscription.update {admin_id: oldId}, {admin_id: newId}, (error) ->
|
||||
callback(error) if error?
|
||||
return callback(error) if error?
|
||||
|
||||
replaceInArray Subscription, "manager_ids", oldId, newId, (error) ->
|
||||
callback(error) if error?
|
||||
return callback(error) if error?
|
||||
|
||||
replaceInArray Subscription, "member_ids", oldId, newId, callback
|
||||
|
||||
|
|
Loading…
Reference in a new issue