feat: 增加用户修改密码与管理员重置密码
This commit is contained in:
@@ -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 } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user