bin/manage_users: Don't allow empty passwords

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-04-03 17:53:54 +02:00
parent 101bedaecd
commit 337173bb38

View file

@ -42,7 +42,10 @@ async function createUser(argv) {
}
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
const ref = await models.User.create({email: argv["add"], password: pass});