Fix after changes to endpoints

This commit is contained in:
Matej Bačo committed 2023-07-31 08:49:36 +02:00
1 parent 1d75b39555
commit 9256f224d2
3 files changed
+3 -9

No files matched your search

@@ -37,9 +37,7 @@
function connectGitHub() {
const redirect = new URL($page.url);
redirect.searchParams.append('github-installed', 'true');
const target = new URL(
`${sdk.forProject.client.config.endpoint}/v1/vcs/github/installations`
);
const target = new URL(`${sdk.forProject.client.config.endpoint}/v1/vcs/github/authorize`);
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('redirect', redirect.toString());
return target;
@@ -10,9 +10,7 @@
function connectGitHub() {
const redirect = new URL($page.url);
redirect.searchParams.append('alert', 'installation-created');
const target = new URL(
`${sdk.forProject.client.config.endpoint}/v1/vcs/github/installations`
);
const target = new URL(`${sdk.forProject.client.config.endpoint}/v1/vcs/github/authorize`);
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('redirect', redirect.toString());
goto(target);
@@ -61,9 +61,7 @@
function configureGitHub() {
const redirect = new URL($page.url);
redirect.searchParams.append('alert', 'installation-updated');
const target = new URL(
`${sdk.forProject.client.config.endpoint}/v1/vcs/github/installations`
);
const target = new URL(`${sdk.forProject.client.config.endpoint}/v1/vcs/github/authorize`);
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('redirect', redirect.toString());
goto(target);