Przeglądaj źródła

Fix mode not being on the body

jnfrati 4 lat temu
rodzic
commit
c921f36639

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/preview-environments/components/ConnectNewRepo.tsx

@@ -72,6 +72,7 @@ const ConnectNewRepo: React.FC = () => {
         "<token>",
         {
           name: "Preview",
+          mode: enableAutomaticDeployments ? "auto" : "manual",
         },
         {
           project_id: currentProject.id,
@@ -79,7 +80,6 @@ const ConnectNewRepo: React.FC = () => {
           git_installation_id: actionConfig.git_repo_id,
           git_repo_name: repoName,
           git_repo_owner: owner,
-          mode: enableAutomaticDeployments ? "auto" : "manual",
         }
       )
       .then(() => {

+ 1 - 1
dashboard/src/shared/api.tsx

@@ -88,6 +88,7 @@ const createEmailVerification = baseApi<{}, {}>("POST", (pathParams) => {
 const createEnvironment = baseApi<
   {
     name: string;
+    mode: "auto" | "manual";
   },
   {
     project_id: number;
@@ -95,7 +96,6 @@ const createEnvironment = baseApi<
     git_installation_id: number;
     git_repo_owner: string;
     git_repo_name: string;
-    mode: "auto" | "manual";
   }
 >("POST", (pathParams) => {
   let {