update failed, not authenticated, when trying to change passwords

This commit is contained in:
Leon Serfaty G
2025-07-17 11:26:42 +00:00
parent 42bfc7ca05
commit d3f82b93fa
+1 -1
View File
@@ -43,7 +43,7 @@ export async function updateUser(
const { name, email, password } = validated.data; const { name, email, password } = validated.data;
try { try {
if (password) { if (password && password.length > 0) {
// In a real application, hash the password // In a real application, hash the password
const stmt = db.prepare( const stmt = db.prepare(
'UPDATE users SET name = ?, email = ?, password = ? WHERE id = ?' 'UPDATE users SET name = ?, email = ?, password = ? WHERE id = ?'