From 579f7c1bad177809a543a27b23d1c53c470c2b52 Mon Sep 17 00:00:00 2001 From: Sylvie Date: Sun, 26 Nov 2023 12:02:01 -0700 Subject: [PATCH] fix: display new users token after creation --- 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 147f241b..afbe2a45 100644 --- a/src/tools/script.adduser.ts +++ b/src/tools/script.adduser.ts @@ -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))); }