overleaf/services/web/scripts/upgrade_institution_users.js
Alasdair Smith 659242b457 Merge pull request #1037 from sharelatex/as-decaffeinate
Decaffeinate frontend

GitOrigin-RevId: 1c8c53dedecfe55f9936a13408df17b852f996de
2018-11-05 10:19:25 +00:00

14 lines
444 B
JavaScript

const InstitutionsManager = require('../app/js/Features/Institutions/InstitutionsManager')
const institutionId = parseInt(process.argv[2])
if (isNaN(institutionId)) throw new Error('No institution id')
console.log('Upgrading users of institution', institutionId)
InstitutionsManager.upgradeInstitutionUsers(institutionId, function(error) {
if (error) {
console.log(error)
} else {
console.log('DONE 👌')
}
process.exit()
})