mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-06-29 15:35:49 +00:00
fix updating logic
This commit is contained in:
@@ -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