From 82b662f095b883abc64b13c50fb5e50e4aed57f6 Mon Sep 17 00:00:00 2001 From: lgalis Date: Mon, 24 Jun 2024 16:40:16 -0400 Subject: [PATCH] [AAP-25216] Use the GET choice for the Select resource type options (#2579) --- cypress/fixtures/edaRoleDefinitionsOptions.json | 2 +- .../common/EdaRolesWizardSteps/EdaSelectResourceTypeStep.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/fixtures/edaRoleDefinitionsOptions.json b/cypress/fixtures/edaRoleDefinitionsOptions.json index bee021f622..56722454e6 100644 --- a/cypress/fixtures/edaRoleDefinitionsOptions.json +++ b/cypress/fixtures/edaRoleDefinitionsOptions.json @@ -4,7 +4,7 @@ "renders": ["application/json", "text/html"], "parses": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], "actions": { - "POST": { + "GET": { "id": { "type": "integer", "required": false, diff --git a/frontend/eda/access/common/EdaRolesWizardSteps/EdaSelectResourceTypeStep.tsx b/frontend/eda/access/common/EdaRolesWizardSteps/EdaSelectResourceTypeStep.tsx index 283450ef36..09bc18bb47 100644 --- a/frontend/eda/access/common/EdaRolesWizardSteps/EdaSelectResourceTypeStep.tsx +++ b/frontend/eda/access/common/EdaRolesWizardSteps/EdaSelectResourceTypeStep.tsx @@ -13,14 +13,14 @@ export function EdaSelectResourceTypeStep() { const { t } = useTranslation(); const { wizardData, setWizardData, setStepData } = usePageWizard(); const { data, isLoading } = useOptions<{ - actions: { POST: { content_type: { choices: ContentTypeOption[] } } }; + actions: { GET: { content_type: { choices: ContentTypeOption[] } } }; }>(edaAPI`/role_definitions/`); if (isLoading || !data) { return ; } - const options: ContentTypeOption[] = data?.actions?.POST?.content_type?.choices || []; + const options: ContentTypeOption[] = data?.actions?.GET?.content_type?.choices || []; return (