overleaf/services/web/scripts/upgrade_institution_users.js

15 lines
445 B
JavaScript
Raw Normal View History

const InstitutionsManager = require('../app/src/Features/Institutions/InstitutionsManager')
2018-07-10 21:53:06 +00:00
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) {
2018-07-10 21:53:06 +00:00
if (error) {
console.log(error)
} else {
console.log('DONE 👌')
}
process.exit()
})