mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-11 14:52:01 +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;
|
const name = props.organization ? props.author : props.slug;
|
||||||
|
|
||||||
function leave() {
|
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")
|
useInternalApi(url, "post")
|
||||||
.then(() => router.go(0))
|
.then(() => router.go(0))
|
||||||
.catch((e) => handleRequestError(e));
|
.catch((e) => handleRequestError(e));
|
||||||
|
@ -92,7 +92,7 @@ function cancelTransfer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saving.value = true;
|
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")
|
useInternalApi(url, "post")
|
||||||
.then(() => router.go(0))
|
.then(() => router.go(0))
|
||||||
.catch((e) => handleRequestError(e))
|
.catch((e) => handleRequestError(e))
|
||||||
@ -122,7 +122,7 @@ function post(member: EditableMember, action: "edit" | "add" | "remove") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saving.value = true;
|
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)
|
useInternalApi(url, "post", member)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
router.go(0);
|
router.go(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user