From c676f64a1d3f907856a7f4bd70eeaf4abc8b1925 Mon Sep 17 00:00:00 2001 From: Jane Pavlova <35457637+pavlovajane@users.noreply.github.com> Date: Wed, 19 Feb 2025 19:14:05 -0500 Subject: [PATCH 1/2] Add task-3 --- .gitignore | 3 +++ src/constants/apiPaths.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0eac30726..0cdefa2d4 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ dist-ssr *.njsproj *.sln *.sw? +.venv +build +cdk.out \ No newline at end of file diff --git a/src/constants/apiPaths.ts b/src/constants/apiPaths.ts index 6846a7534..61f7c8af5 100755 --- a/src/constants/apiPaths.ts +++ b/src/constants/apiPaths.ts @@ -1,5 +1,5 @@ const API_PATHS = { - product: "https://.execute-api.eu-west-1.amazonaws.com/dev", + product: "https://6t7fhbiyr6.execute-api.us-east-2.amazonaws.com/prod/", //"https://.execute-api.eu-west-1.amazonaws.com/dev", order: "https://.execute-api.eu-west-1.amazonaws.com/dev", import: "https://.execute-api.eu-west-1.amazonaws.com/dev", bff: "https://.execute-api.eu-west-1.amazonaws.com/dev", From 2b0e66e68ab670364529bb3e773175b3ae047bc6 Mon Sep 17 00:00:00 2001 From: Jane Pavlova <35457637+pavlovajane@users.noreply.github.com> Date: Thu, 20 Feb 2025 17:18:38 -0500 Subject: [PATCH 2/2] Fix frontend application to use correct urls --- src/queries/products.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/queries/products.ts b/src/queries/products.ts index 090a803f3..ee9e67387 100644 --- a/src/queries/products.ts +++ b/src/queries/products.ts @@ -9,7 +9,7 @@ export function useAvailableProducts() { "available-products", async () => { const res = await axios.get( - `${API_PATHS.bff}/product/available` + `${API_PATHS.product}/products` ); return res.data; } @@ -29,7 +29,7 @@ export function useAvailableProduct(id?: string) { ["product", { id }], async () => { const res = await axios.get( - `${API_PATHS.bff}/product/${id}` + `${API_PATHS.product}/products/${id}` ); return res.data; },