overleaf/services/web/scripts/check_institution_users.js
nate stemen 9cc5dc968c Merge pull request #1957 from overleaf/ns-decaf-cleanup
.../js/... -> .../src/...

GitOrigin-RevId: ab509c633529440f05247d19c320ebb77d506768
2019-07-11 18:55:42 +00:00

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