Skip to content

Commit

Permalink
Merge pull request #525 from appwrite/fix-vcs-route-scope
Browse files Browse the repository at this point in the history
  • Loading branch information
christyjacob4 authored Aug 30, 2023
2 parents bfd14ef + a063d86 commit 88b6d59
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/lib/commandCenter/panels/ai.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
const { input, handleSubmit, completion, isLoading, complete, error } = useCompletion({
api: endpoint + '/console/assistant',
headers: {
'x-appwrite-mode': 'admin',
'content-type': 'application/json'
}
});
Expand Down
3 changes: 2 additions & 1 deletion src/lib/wizards/functions/components/repositories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@
});
}
const target = new URL(`${sdk.forProject.client.config.endpoint}/vcs/github/authorize`);
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('project', $page.params.project);
target.searchParams.set('success', redirect.toString());
target.searchParams.set('failure', redirect.toString());
target.searchParams.set('mode', 'admin');
return target;
}
</script>
Expand Down
3 changes: 2 additions & 1 deletion src/lib/wizards/functions/steps/createRepository.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@
});
}
const target = new URL(`${sdk.forProject.client.config.endpoint}/vcs/github/authorize`);
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('project', $page.params.project);
target.searchParams.set('success', redirect.toString());
target.searchParams.set('failure', redirect.toString());
target.searchParams.set('mode', 'admin');
return target;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
const redirect = new URL($page.url);
redirect.searchParams.append('alert', 'installation-created');
const target = new URL(`${sdk.forProject.client.config.endpoint}/vcs/github/authorize`);
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('project', $page.params.project);
target.searchParams.set('success', redirect.toString());
target.searchParams.set('failure', redirect.toString());
target.searchParams.set('mode', 'admin');
goto(target);
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
// `${sdk.forProject.client.config.endpoint}/migrations/firebase/connect`
// );
// target.searchParams.set('redirect', redirect.toString());
// target.searchParams.set('projectId', $page.params.project);
// target.searchParams.set('project', $page.params.project);
// target.searchParams.set('mode', 'admin');
// return target;
// }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@
const redirect = new URL($page.url);
redirect.searchParams.append('alert', 'installation-updated');
const target = new URL(`${sdk.forProject.client.config.endpoint}/vcs/github/authorize`);
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('project', $page.params.project);
target.searchParams.set('success', redirect.toString());
target.searchParams.set('failure', redirect.toString());
target.searchParams.set('mode', 'admin');
return target?.toString();
}
Expand Down

3 comments on commit 88b6d59

@vercel
Copy link

@vercel vercel bot commented on 88b6d59 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

console-preview – ./

console-preview-appwrite.vercel.app
console-preview-git-main-appwrite.vercel.app
console-next.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 88b6d59 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

console-cloud – ./

console-cloud-git-main-appwrite.vercel.app
console-cloud-appwrite.vercel.app
console-cloud.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 88b6d59 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.