chore: update member list action buttons

This commit is contained in:
boojack
2022-07-26 22:36:24 +08:00
parent 7b1bad5b29
commit d371cfd78d
9 changed files with 104 additions and 14 deletions

View File

@ -34,7 +34,7 @@ export function createUser(userCreate: UserCreate) {
return axios.post<ResponseObject<User>>("/api/user", userCreate);
}
export function getUser() {
export function getMyselfUser() {
return axios.get<ResponseObject<User>>("/api/user/me");
}
@ -47,7 +47,11 @@ export function getUserById(id: number) {
}
export function patchUser(userPatch: UserPatch) {
return axios.patch<ResponseObject<User>>("/api/user/me", userPatch);
return axios.patch<ResponseObject<User>>(`/api/user/${userPatch.id}`, userPatch);
}
export function deleteUser(userDelete: UserDelete) {
return axios.delete(`/api/user/${userDelete.id}`);
}
export function getMemoList(memoFind?: MemoFind) {