更新用户管理相关

This commit is contained in:
2026-06-03 23:58:17 +08:00
parent 9221a53617
commit 63676f7f34
12 changed files with 464 additions and 176 deletions
+5
View File
@@ -1,4 +1,5 @@
import type {
AdminLoginLogsResponse,
AdminLoginResponse,
AdminManagedUserResponse,
AdminMqttStatus,
@@ -95,3 +96,7 @@ export function createAdminUser(username: string, password: string): Promise<Adm
export function updateAdminUserPassword(id: number, password: string): Promise<AdminManagedUserResponse> {
return putJSON<AdminManagedUserResponse>(`/api/admin/users/${id}/password`, { password })
}
export function getAdminLoginLogs(limit = 100, offset = 0): Promise<AdminLoginLogsResponse> {
return getJSON<AdminLoginLogsResponse>(`/api/admin/log/login?limit=${limit}&offset=${offset}`)
}