overleaf/services/web/scripts/upgrade_institution_users.js
Simon Detheridge 321d66f804 Merge pull request #1869 from overleaf/ns-uprade-task-decaf-bug
.../js/... -> .../src/...

GitOrigin-RevId: d93cc4c34010ea7b318778a456e59bd702faa739
2019-06-17 15:14:18 +00:00

14 lines
445 B
JavaScript

const InstitutionsManager = require('../app/src/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()
})