From a70bc534bba4512fff5ae5b71d95444bb586c3c5 Mon Sep 17 00:00:00 2001 From: tycrek Date: Sun, 11 Jun 2023 00:21:02 -0600 Subject: [PATCH] fix: add user script failing (verified issue & solution) --- src/tools/script.adduser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/script.adduser.ts b/src/tools/script.adduser.ts index 95c61df..147f241 100644 --- a/src/tools/script.adduser.ts +++ b/src/tools/script.adduser.ts @@ -20,7 +20,7 @@ if (process.argv.length < 4) { const admin = process.argv[4] ? process.argv[4].toLowerCase() === 'true' : false; 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) => { const user = response.data as User; logger.info('User created', username, user.unid).callback(() => process.exit(0))