Skip to content

Commit

Permalink
[AAP-25216] Use the GET choice for the Select resource type options (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis authored Jun 24, 2024
1 parent 868a8f1 commit 82b662f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/fixtures/edaRoleDefinitionsOptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <LoadingPage />;
}

const options: ContentTypeOption[] = data?.actions?.POST?.content_type?.choices || [];
const options: ContentTypeOption[] = data?.actions?.GET?.content_type?.choices || [];

return (
<PageFormSelect
Expand Down

0 comments on commit 82b662f

Please sign in to comment.