mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
pr fixes
GitOrigin-RevId: 15a0371c285256b871a9c3e393077af1371d1e5c
This commit is contained in:
committed by
sharelatex
parent
432f4d3a06
commit
9902edcfbb
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user