mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01: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, {
|
const updatedUser = User.findOneAndUpdate(query, update, {
|
||||||
new: true
|
new: true
|
||||||
}).exec()
|
}).exec()
|
||||||
// update v1 affiliations record
|
|
||||||
if (hasEntitlement) {
|
|
||||||
await InstitutionsAPI.promises.addEntitlement(userId, institutionEmail)
|
|
||||||
}
|
|
||||||
return updatedUser
|
return updatedUser
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.code === 11000) {
|
if (err.code === 11000) {
|
||||||
@@ -173,6 +169,10 @@ async function linkAccounts(
|
|||||||
)
|
)
|
||||||
await _addInstitutionEmail(userId, institutionEmail, providerId)
|
await _addInstitutionEmail(userId, institutionEmail, providerId)
|
||||||
await _sendLinkedEmail(userId, providerName)
|
await _sendLinkedEmail(userId, providerName)
|
||||||
|
// update v1 affiliations record
|
||||||
|
if (hasEntitlement) {
|
||||||
|
await InstitutionsAPI.promises.addEntitlement(userId, institutionEmail)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unlinkAccounts(
|
async function unlinkAccounts(
|
||||||
|
|||||||
Reference in New Issue
Block a user