feat(header): modify_password
This commit is contained in:
@@ -38,6 +38,15 @@ export const userEditById = (data: User.EditProps, id: number) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户密码
|
||||
export const userModifyPassword = (data: User.ModifyPasswordProps) => {
|
||||
return httpFetch({
|
||||
url: BASE_LABEL_API + `/api/v1/label_server/user/modify_password`,
|
||||
method: "PUT",
|
||||
body: JSON.stringify(data),
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑用户组织
|
||||
export const userUpdateGroup = (data: User.UpdateGroupProps) => {
|
||||
return httpFetch({
|
||||
@@ -65,16 +74,7 @@ export const userGroupAdd = (data: Organization.CreateProps) => {
|
||||
}
|
||||
|
||||
// 修改用户密码
|
||||
export const modifyUserPassword = (data: {
|
||||
old_password: string
|
||||
new_password: string
|
||||
}) => {
|
||||
return httpFetch({
|
||||
url: BASE_LABEL_API + "/api/v1/label_server/user/modify_password",
|
||||
method: "PUT",
|
||||
body: JSON.stringify(data),
|
||||
})
|
||||
}
|
||||
export const modifyUserPassword = userModifyPassword
|
||||
|
||||
/* ****************************** Options ****************************** */
|
||||
interface Option {
|
||||
|
||||
@@ -41,6 +41,11 @@ export namespace User {
|
||||
work_status?: number
|
||||
}
|
||||
|
||||
export interface ModifyPasswordProps {
|
||||
new_password: string
|
||||
old_password: string
|
||||
}
|
||||
|
||||
export interface UpdateGroupProps {
|
||||
user_id: number
|
||||
group_uuid: string
|
||||
|
||||
Reference in New Issue
Block a user