mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
pr fixes
GitOrigin-RevId: 15a0371c285256b871a9c3e393077af1371d1e5c
This commit is contained in:
parent
432f4d3a06
commit
9902edcfbb
1 changed files with 4 additions and 4 deletions
|
@ -53,10 +53,6 @@ async function _addIdentifier(
|
|||
const updatedUser = User.findOneAndUpdate(query, update, {
|
||||
new: true
|
||||
}).exec()
|
||||
// update v1 affiliations record
|
||||
if (hasEntitlement) {
|
||||
await InstitutionsAPI.promises.addEntitlement(userId, institutionEmail)
|
||||
}
|
||||
return updatedUser
|
||||
} catch (err) {
|
||||
if (err.code === 11000) {
|
||||
|
@ -173,6 +169,10 @@ async function linkAccounts(
|
|||
)
|
||||
await _addInstitutionEmail(userId, institutionEmail, providerId)
|
||||
await _sendLinkedEmail(userId, providerName)
|
||||
// update v1 affiliations record
|
||||
if (hasEntitlement) {
|
||||
await InstitutionsAPI.promises.addEntitlement(userId, institutionEmail)
|
||||
}
|
||||
}
|
||||
|
||||
async function unlinkAccounts(
|
||||
|
|
Loading…
Reference in a new issue