Finish optimizing qovery integration, add docs for it

This commit is contained in:
Tuan Dang
2023-09-19 14:43:20 +01:00
parent e3ef826f52
commit b6219e14f0
11 changed files with 16 additions and 6 deletions
@@ -164,6 +164,8 @@ const fetchIntegrationAuthQoveryProjects = async ({
integrationAuthId: string;
orgId: string;
}) => {
if (orgId === "none") return [];
const {
data: { projects }
} = await apiRequest.get<{ projects: Project[] }>(
@@ -185,6 +187,8 @@ const fetchIntegrationAuthQoveryEnvironments = async ({
integrationAuthId: string;
projectId: string;
}) => {
if (projectId === "none") return [];
const {
data: { environments }
} = await apiRequest.get<{ environments: Environment[] }>(
@@ -208,6 +212,8 @@ const fetchIntegrationAuthQoveryScopes = async ({
environmentId: string;
scope: "job" | "application" | "container";
}) => {
if (environmentId === "none") return [];
if (scope === "application") {
const {
data: { apps }