Update: build artifacts and classes

This commit is contained in:
likingcode
2026-03-18 15:18:30 +08:00
parent efcfe7e012
commit e8afe9a5f4
33 changed files with 394 additions and 27 deletions

View File

@@ -143,7 +143,8 @@ public class UserController {
// 加载用户列表
async function loadUsers() {
const res = await fetch('/api/users');
const users = await res.json();
const payload = await res.json();
const users = payload.data || [];
const tbody = document.querySelector('#userTable tbody');
tbody.innerHTML = users.map(u => `
<tr>
@@ -196,7 +197,7 @@ public class UserController {
await fetch(`/api/users/${id}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ ...user, id: parseInt(id) })
body: JSON.stringify(user)
});
} else {
await fetch('/api/users', {