From f13b91172d74b5b6fd87cb0ec1d5a9185768617a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B8ran=20Brekke=20Svaland?= Date: Thu, 20 Jun 2024 13:31:30 +0200 Subject: [PATCH] fix: graphql returned data did not match ts interface --- frontend/src/routes/secrets/[secret_id]/+page.svelte | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/routes/secrets/[secret_id]/+page.svelte b/frontend/src/routes/secrets/[secret_id]/+page.svelte index fb7c2e43..7fec1b7d 100644 --- a/frontend/src/routes/secrets/[secret_id]/+page.svelte +++ b/frontend/src/routes/secrets/[secret_id]/+page.svelte @@ -16,10 +16,8 @@ // let template: any; interface ResponseType { - data: { - workflowTemplate: { - argoWorkflowTemplate: any; // Replace 'any' with the actual type - }; + workflowTemplate: { + argoWorkflowTemplate: any; // Replace 'any' with the actual type }; } @@ -68,7 +66,7 @@ }); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access - const template = response.data.workflowTemplate.argoWorkflowTemplate; + const template = response.workflowTemplate.argoWorkflowTemplate; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access template.spec.imagePullSecrets = [{ name: $selectedCredential.name }]; // update path of template images: