bin/manage_users: Don't allow empty passwords
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
101bedaecd
commit
337173bb38
@ -42,7 +42,10 @@ async function createUser(argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const pass = getPass(argv, "add");
|
const pass = getPass(argv, "add");
|
||||||
|
if (pass.length === 0) {
|
||||||
|
console.log("Password cannot be empty!");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Lets try to create, and check success
|
// Lets try to create, and check success
|
||||||
const ref = await models.User.create({email: argv["add"], password: pass});
|
const ref = await models.User.create({email: argv["add"], password: pass});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user