fix(cli): fix wmill user create-token with email and password

This commit is contained in:
Ruben Fiszel
2025-03-05 09:41:32 +01:00
parent dc8c3114d9
commit a16cab0923
+3 -1
View File
@@ -109,6 +109,8 @@ async function remove(opts: GlobalOptions, email: string) {
async function createToken(
opts: GlobalOptions & { email: string; password: string }
) {
await requireLogin(opts);
if (opts.email && opts.password) {
log.info(
"Token: " +
@@ -119,9 +121,9 @@ async function createToken(
},
}))
);
return;
}
await requireLogin(opts);
log.info("Token: " + (await wmill.createToken({ requestBody: {} })));
}