fix: display new users token after creation

This commit is contained in:
Sylvie 2023-11-26 12:02:01 -07:00
parent bf07999ed8
commit 579f7c1bad
No known key found for this signature in database
GPG Key ID: 75AB0FE5B983A3AF
1 changed files with 1 additions and 1 deletions

View File

@ -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)));
}