fix: multiple small fixes
This commit is contained in:
parent
6b44c6aa37
commit
d8f163af74
11 changed files with 135 additions and 152 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue