Update api.js

This commit is contained in:
Furrium Network authored and GitHub committed 2026-08-10 17:29:57 +08:00
1 parent 5f274c2d86
commit 77e5c8c3ba
1 file changed
+4 -4
+4 -4
View File
@@ -128,12 +128,12 @@ const API = {
},
// ============================================================
// 用户管理
// 用户管理(支持分页和搜索)
// ============================================================
async getUsers() {
const data = await apiFetch('/users');
async getUsers(page = 1, limit = 20, search = '') {
const data = await apiFetch('/users?page=' + page + '&limit=' + limit + '&search=' + encodeURIComponent(search));
if (data.error) throw new Error(data.error);
return data || [];
return data;
},
async updateUserRole(userId, role) {