fix: full name not change when update

This commit is contained in:
Methapon2001 2025-01-06 09:58:26 +07:00
parent a4ba0e032f
commit c2a592bf19

View file

@ -642,11 +642,13 @@ export class UserController extends Controller {
}
}
if (body.username) {
if (body.username || body.email || body.firstName || body.lastName) {
await editUser(userId, {
firstName: body.firstName,
lastName: body.lastName,
username: body.username,
email: body.email,
enabled: body.status !== "INACTIVE",
enabled: body.status ? body.status !== "INACTIVE" : undefined,
});
} else if (body.status) {
await editUser(userId, { enabled: body.status !== "INACTIVE" });