mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 06:05:30 -05:00
18 lines
462 B
JavaScript
18 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()
|
||
|
})
|