overleaf/services/web/scripts/check_institution_users.js
Timothée Alby b311f997aa Merge pull request #1444 from sharelatex/ta-ns-check-institution-users
add script to check all if users on institution are upgraded

GitOrigin-RevId: 903f3a65fc038862178a82f43d97a5a4630cf470
2019-01-28 14:38:29 +00:00

17 lines
462 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('Checking users of institution', institutionId)
InstitutionsManager.checkInstitutionUsers(institutionId, function(
error,
usersSummary
) {
if (error) {
console.log(error)
} else {
console.log(usersSummary)
}
process.exit()
})