fix: fix null password

This commit is contained in:
2026-02-02 15:58:27 +03:00
parent 144e7cb00c
commit 58abe15ec4
2 changed files with 2 additions and 1 deletions

View File

@@ -168,8 +168,8 @@ export const UserEditPage = observer(() => {
<TextField
fullWidth
label="Пароль"
placeholder="Оставить пустым, чтобы не менять"
value={editUserData.password || ""}
required
onChange={(e) =>
setEditUserData(
editUserData.name || "",

View File

@@ -121,6 +121,7 @@ class UserStore {
editUser = async (id: number) => {
const payload = { ...this.editUserData };
if (!payload.icon) delete payload.icon;
if (!payload.password?.trim()) delete payload.password;
const response = await authInstance.patch(`/user/${id}`, payload);
runInAction(() => {