更新用户管理相关
This commit is contained in:
@@ -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}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user