Skip to content

Commit

Permalink
fix: display new users token after creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tycrek committed Nov 26, 2023
1 parent bf07999 commit 579f7c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/script.adduser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (process.argv.length < 4) {
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))
logger.info('User created', `${username} (${user.unid})`, `token: ${user.token}`).callback(() => process.exit(0))
})
.catch((err) => logger.error(err).callback(() => process.exit(1)));
}

0 comments on commit 579f7c1

Please # to comment.