diff --git a/admin/index.html b/admin/index.html
index c5ddaca..f4f2c1c 100644
--- a/admin/index.html
+++ b/admin/index.html
@@ -242,18 +242,19 @@
@@ -275,27 +276,27 @@
diff --git a/admin/js/admin.js b/admin/js/admin.js
index 71971c5..99074a5 100644
--- a/admin/js/admin.js
+++ b/admin/js/admin.js
@@ -204,6 +204,7 @@ function loadUsers() {
function saveUser() {
const userId = $('#userId').val();
const userData = {
+ user_id: userId, // 添加user_id字段
username: $('#username').val().trim(),
email: $('#email').val().trim(),
password: $('#password').val()
@@ -220,7 +221,7 @@ function saveUser() {
}
const url = userId ?
- `${API_BASE_URL}/users/profile/${userId}` : // 更新为正确的API路径
+ `${API_BASE_URL}/users/profile/${userId}` :
`${API_BASE_URL}/users/register`;
const method = userId ? 'PUT' : 'POST';