From b89dc9e4a3dc160262b58bace390b3538cd1a259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leandro=20Ant=C3=B4nio=20Farias=20Machado?= Date: Mon, 15 May 2023 10:33:31 -0300 Subject: [PATCH 1/3] feat(devops): deploy front on ec2 [test1] --- .github/workflows/github-actions-ec2.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/github-actions-ec2.yml diff --git a/.github/workflows/github-actions-ec2.yml b/.github/workflows/github-actions-ec2.yml new file mode 100644 index 0000000..e69de29 From 4efb6595ea197ea14dc48ecef963b0817a9bb535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leandro=20Ant=C3=B4nio=20Farias=20Machado?= Date: Thu, 8 Jun 2023 11:46:50 -0300 Subject: [PATCH 2/3] chore(frontend): use url from env --- frontend/src/sections/devices/devices-rpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/sections/devices/devices-rpc.js b/frontend/src/sections/devices/devices-rpc.js index 50d2511..e9b9792 100644 --- a/frontend/src/sections/devices/devices-rpc.js +++ b/frontend/src/sections/devices/devices-rpc.js @@ -84,7 +84,7 @@ const handleOpen = () => { } - fetch(`https://d9962fd9-2464-4a30-9a86-a15a04b57ad0.mock.pstmn.io/device/${router.query.id}/${method}`, requestOptions) + fetch(`${process.env.NEXT_PUBLIC_REST_ENPOINT}/device/${router.query.id}/${method}`, requestOptions) .then(response => response.text()) .then(result => { setOpen(false) From e30cd64f5e1fa8730dece3b91bac406f72cbefed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leandro=20Ant=C3=B4nio=20Farias=20Machado?= Date: Thu, 8 Jun 2023 12:37:32 -0300 Subject: [PATCH 3/3] hotfix(frontend): send request with auth token --- frontend/src/sections/devices/devices-rpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/sections/devices/devices-rpc.js b/frontend/src/sections/devices/devices-rpc.js index e9b9792..1800347 100644 --- a/frontend/src/sections/devices/devices-rpc.js +++ b/frontend/src/sections/devices/devices-rpc.js @@ -55,7 +55,7 @@ const handleOpen = () => { setOpen(true); var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); - myHeaders.append("Authorization", ""); + myHeaders.append("Authorization", localStorage.getItem("token")); var raw = value