fix: add user script failing (verified issue & solution)

pull/217/head
tycrek 1 year ago
parent 0061ba0fc8
commit a70bc534bb
No known key found for this signature in database
GPG Key ID: FF8A54DCE404885A

@ -20,7 +20,7 @@ if (process.argv.length < 4) {
const admin = process.argv[4] ? process.argv[4].toLowerCase() === 'true' : false; const admin = process.argv[4] ? process.argv[4].toLowerCase() === 'true' : false;
const meta = process.argv[5] ? JSON.parse(process.argv[5]) : {}; const meta = process.argv[5] ? JSON.parse(process.argv[5]) : {};
axios.post(`http://localhost:${port}/api/user/new`, { username, password, admin, meta }, { headers: { 'Authorization': cliKey } }) axios.post(`http://localhost:${port}/api/user`, { username, password, admin, meta }, { headers: { 'Authorization': cliKey } })
.then((response) => { .then((response) => {
const user = response.data as User; const user = response.data as User;
logger.info('User created', username, user.unid).callback(() => process.exit(0)) logger.info('User created', username, user.unid).callback(() => process.exit(0))

Loading…
Cancel
Save