mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #4653 from overleaf/jel-remove-underscore-institutions
Remove underscore usage when processing users to refresh GitOrigin-RevId: fd3fd90f5fd3e81a1bb6fceb83a64063ce212251
This commit is contained in:
parent
01b9be5ecd
commit
0acd81dfc0
1 changed files with 2 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
const async = require('async')
|
const async = require('async')
|
||||||
const _ = require('underscore')
|
|
||||||
const { callbackify } = require('util')
|
const { callbackify } = require('util')
|
||||||
const { ObjectId } = require('mongodb')
|
const { ObjectId } = require('mongodb')
|
||||||
const Settings = require('@overleaf/settings')
|
const Settings = require('@overleaf/settings')
|
||||||
|
@ -189,11 +188,10 @@ const InstitutionsManager = {
|
||||||
[
|
[
|
||||||
cb => fetchInstitutionAndAffiliations(institutionId, cb),
|
cb => fetchInstitutionAndAffiliations(institutionId, cb),
|
||||||
function (institution, affiliations, cb) {
|
function (institution, affiliations, cb) {
|
||||||
affiliations = _.map(affiliations, function (affiliation) {
|
for (const affiliation of affiliations) {
|
||||||
affiliation.institutionName = institution.name
|
affiliation.institutionName = institution.name
|
||||||
affiliation.institutionId = institutionId
|
affiliation.institutionId = institutionId
|
||||||
return affiliation
|
}
|
||||||
})
|
|
||||||
async.eachLimit(affiliations, ASYNC_LIMIT, refreshFunction, err =>
|
async.eachLimit(affiliations, ASYNC_LIMIT, refreshFunction, err =>
|
||||||
cb(err)
|
cb(err)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue