fix: multiple small fixes

This commit is contained in:
Sérgio Salgado 2021-11-24 22:11:25 +00:00
parent 6b44c6aa37
commit d8f163af74
11 changed files with 135 additions and 152 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env node
const { asyncLocalStorage, defaultStore } = require('../lib/async-storage')
const authentication = require('../lib/new-admin/graphql/modules/authentication')
const userManagement = require('../lib/new-admin/graphql/modules/userManagement')
const options = require('../lib/options')
const name = process.argv[2]
@ -31,7 +31,7 @@ if (role !== 'user' && role !== 'superuser') {
}
asyncLocalStorage.run(defaultStore(), () => {
authentication.createRegisterToken(name, role).then(token => {
userManagement.createRegisterToken(name, role).then(token => {
if (!token) {
console.log(`A user named ${name} already exists!`)
process.exit(2)