feat(header): modify_password

This commit is contained in:
zhangheng
2026-05-25 13:42:38 +08:00
parent 5c81a990a6
commit 8e75a1629f
3 changed files with 147 additions and 10 deletions

View File

@@ -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 {

View File

@@ -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