Fix member actions

This commit is contained in:
Nassim Jahnke 2023-12-08 16:24:14 +01:00
parent 35b2163e2e
commit d24bf1357b
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
2 changed files with 3 additions and 3 deletions

View File

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

View File

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