fetch(modify):修复API的URL
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m1s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m1s
This commit is contained in:
@@ -92,4 +92,24 @@ export class AccountService extends BaseService {
|
||||
static removeRoleFromAccount(accountId: number, roleId: number): Promise<BaseResponse> {
|
||||
return this.delete<BaseResponse>(`/api/admin/accounts/${accountId}/roles/${roleId}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改账号密码
|
||||
* PUT /api/admin/accounts/{id}/password
|
||||
* @param id 账号ID
|
||||
* @param password 新密码
|
||||
*/
|
||||
static updateAccountPassword(id: number, password: string): Promise<BaseResponse> {
|
||||
return this.put<BaseResponse>(`/api/admin/accounts/${id}/password`, { password })
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改账号状态
|
||||
* PUT /api/admin/accounts/{id}/status
|
||||
* @param id 账号ID
|
||||
* @param status 状态 (0:禁用, 1:启用)
|
||||
*/
|
||||
static updateAccountStatus(id: number, status: 0 | 1): Promise<BaseResponse> {
|
||||
return this.put<BaseResponse>(`/api/admin/accounts/${id}/status`, { status })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user