chore: harden reliability checks #2

Merged
nalalangan merged 67 commits from main-new into main 2026-05-25 14:28:32 -09:00
Showing only changes of commit 2a9389532f - Show all commits

View File

@ -13,8 +13,9 @@ exports.findByUsername = async (username) => {
exports.createUser = async (username, hashedPassword, name) => {
const result = await pool.query(
`INSERT INTO users (username, password, name, role)
VALUES ($1, $2, $3, $4)`,
[username, hashedPassword, name, this.ROLES.VIEWER]
VALUES ($1, $2, $3, $4)
RETURNING id, username, name, role`,
[username, hashedPassword, name, exports.ROLES.USER]
);
return result.rows[0];
};