From 19bb05fc48b3e3115c35a273f660f28383275e21 Mon Sep 17 00:00:00 2001 From: GotthardG <51994228+GotthardG@users.noreply.github.com> Date: Wed, 18 Dec 2024 07:30:25 +0100 Subject: [PATCH] Refactor OpenAPI fetcher for improved clarity and robustness Reorganized and enhanced the OpenAPI fetch logic for better maintainability and error handling. Key updates include improved environment variable validation, more detailed error messages, streamlined configuration loading, and additional safety checks for file paths and directories. Added proper logging and ensured the process flow is easy to trace. --- frontend/src/components/ShipmentForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/ShipmentForm.tsx b/frontend/src/components/ShipmentForm.tsx index 28de26a..339f7c5 100644 --- a/frontend/src/components/ShipmentForm.tsx +++ b/frontend/src/components/ShipmentForm.tsx @@ -46,7 +46,7 @@ const ShipmentForm: React.FC = ({ sx = {}, onCancel, refreshS OpenAPI.BASE = mode === 'test' ? import.meta.env.VITE_OPENAPI_BASE_TEST - : mode === 'production' + : mode === 'prod' ? import.meta.env.VITE_OPENAPI_BASE_PROD : import.meta.env.VITE_OPENAPI_BASE_DEV;