update failed, not authenticated, when trying to change passwords
This commit is contained in:
@@ -43,7 +43,7 @@ export async function updateUser(
|
||||
const { name, email, password } = validated.data;
|
||||
|
||||
try {
|
||||
if (password) {
|
||||
if (password && password.length > 0) {
|
||||
// In a real application, hash the password
|
||||
const stmt = db.prepare(
|
||||
'UPDATE users SET name = ?, email = ?, password = ? WHERE id = ?'
|
||||
|
||||
Reference in New Issue
Block a user