mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-21 01:21:54 +08:00
Fix member actions
This commit is contained in:
parent
35b2163e2e
commit
d24bf1357b
@ -23,7 +23,7 @@ const router = useRouter();
|
||||
const name = props.organization ? props.author : props.slug;
|
||||
|
||||
function leave() {
|
||||
const url = props.organization ? `organizations/org/${props.author}/members/leave` : `projects/project/${props.author}/${props.slug}/members/leave`;
|
||||
const url = props.organization ? `organizations/org/${props.author}/members/leave` : `projects/project/${props.slug}/members/leave`;
|
||||
useInternalApi(url, "post")
|
||||
.then(() => router.go(0))
|
||||
.catch((e) => handleRequestError(e));
|
||||
|
@ -92,7 +92,7 @@ function cancelTransfer() {
|
||||
}
|
||||
|
||||
saving.value = true;
|
||||
const url = props.organization ? `organizations/org/${props.author}/canceltransfer` : `projects/project/${props.author}/${props.slug}/canceltransfer`;
|
||||
const url = props.organization ? `organizations/org/${props.author}/canceltransfer` : `projects/project/${props.slug}/canceltransfer`;
|
||||
useInternalApi(url, "post")
|
||||
.then(() => router.go(0))
|
||||
.catch((e) => handleRequestError(e))
|
||||
@ -122,7 +122,7 @@ function post(member: EditableMember, action: "edit" | "add" | "remove") {
|
||||
}
|
||||
|
||||
saving.value = true;
|
||||
const url = props.organization ? `organizations/org/${props.author}/members/${action}` : `projects/project/${props.author}/${props.slug}/members/${action}`;
|
||||
const url = props.organization ? `organizations/org/${props.author}/members/${action}` : `projects/project/${props.slug}/members/${action}`;
|
||||
useInternalApi(url, "post", member)
|
||||
.then(() => {
|
||||
router.go(0);
|
||||
|
Loading…
Reference in New Issue
Block a user