feat: 增加用户修改密码与管理员重置密码

This commit is contained in:
guoqingshan
2026-08-01 21:11:03 +08:00
parent ea9103d765
commit 1e84e8e210
8 changed files with 167 additions and 4 deletions
+8
View File
@@ -40,6 +40,10 @@ function apiLogout() {
return apiFetch('/api/logout', { method: 'POST' });
}
function apiChangePassword(data) {
return apiFetch('/api/change-password', { method: 'POST', body: data });
}
function apiGetEntries() {
return apiFetch('/api/entries');
}
@@ -99,3 +103,7 @@ function apiAdminSetStatus(id, isActive) {
function apiAdminDeleteUser(id) {
return apiFetch('/api/admin/users/' + id, { method: 'DELETE' });
}
function apiAdminResetPassword(id, password) {
return apiFetch('/api/admin/users/' + id + '/password', { method: 'PUT', body: { password: password } });
}