Skip to content

Commit

Permalink
fix(BE): temp fix for try catch in routes.js
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnbarHome committed Feb 2, 2024
1 parent 08aa653 commit 4ccf8cd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions be/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ router.post("/atms/filter", async (req, res) => {
});


router.post("/branches/filter", async (req, res) => {
/*router.post("/branches/filter", async (req, res) => {
try {
const branchFilterCriteria = {
Accessibility: req.body.Accessibility,
Expand All @@ -140,7 +140,7 @@ router.post("/branches/filter", async (req, res) => {
console.error("Error in /branches/filter route:", error.message);
res.status(500).send("Error processing request");
}
});
});*/



Expand All @@ -161,12 +161,14 @@ router.post("/branches/filter", async (req, res) => {
const response = await axios(createFilterConfig("branches/filter", branchFilterCriteria));
return response.data;
}, "branches/filter", branchFilterCriteria, 'POST');
} catch (error) {
const filteredBranches = await axios(filterBranchesConfig);

Check failure on line 165 in be/routes.js

View workflow job for this annotation

GitHub Actions / BE-build

'filterBranchesConfig' is not defined

const filteredBranches = await axios(filterBranchesConfig);

const formattedBranches = formatDataForDisplay(filteredBranches.data, false);
const formattedBranches = formatDataForDisplay(filteredBranches.data, false);

res.json(formattedBranches);
res.json(formattedBranches);
}

});


Expand Down

0 comments on commit 4ccf8cd

Please sign in to comment.