change default admin password
This commit is contained in:
@@ -10,7 +10,7 @@ let createSQLStmt = `CREATE TABLE IF NOT EXISTS users
|
|||||||
db.exec(createSQLStmt);
|
db.exec(createSQLStmt);
|
||||||
|
|
||||||
// check if there are any users; if not add one default admin one
|
// check if there are any users; if not add one default admin one
|
||||||
const userPassword = 'pass-123';
|
const userPassword = 'A-InnoHUB_2025!';
|
||||||
const hashedUserPassword = new jsSHA('SHA-512', 'TEXT').update(userPassword).getHash('HEX');
|
const hashedUserPassword = new jsSHA('SHA-512', 'TEXT').update(userPassword).getHash('HEX');
|
||||||
const checkInsertSQLStmt = `INSERT INTO users (name, pw) SELECT 'admin', '${hashedUserPassword}'
|
const checkInsertSQLStmt = `INSERT INTO users (name, pw) SELECT 'admin', '${hashedUserPassword}'
|
||||||
WHERE NOT EXISTS (SELECT * FROM users);`;
|
WHERE NOT EXISTS (SELECT * FROM users);`;
|
||||||
|
|||||||
Reference in New Issue
Block a user