Sửa lỗi cập nhật thông tin hồ sơ

This commit is contained in:
2026-06-09 17:01:23 +07:00
parent b4b193c72c
commit 18e1c3d76d
9 changed files with 54 additions and 5 deletions
+4
View File
@@ -307,6 +307,10 @@ async function updateProfile(e) {
const form = document.getElementById('profile-form');
const formData = new FormData(form);
// Xóa các trường không cần thiết khi cập nhật hồ sơ cá nhân
formData.delete('agreedToRules'); // Không cần khi cập nhật
formData.delete('role'); // Role chỉ được thay đổi bởi Admin
try {
const res = await fetch(`${API_BASE_URL}/me/profile`, {
method: 'PUT',