mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-09-13 10:24:49 +02:00
fix updating logic
This commit is contained in:
+1
-1
@@ -615,7 +615,7 @@ const app = new Elysia({
|
||||
values.push(await Bun.password.hash(body.newPassword));
|
||||
}
|
||||
|
||||
if (fields.length < 1) {
|
||||
if (fields.length > 0) {
|
||||
db.query(
|
||||
`UPDATE users SET ${fields.map((field) => `${field}=?`).join(", ")} WHERE id=?`,
|
||||
).run(...values, user.id);
|
||||
|
||||
Reference in New Issue
Block a user