Skip to content

Commit

Permalink
fix(API): lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnbarHome committed Feb 2, 2024
1 parent e17d4ef commit 255a244
Show file tree
Hide file tree
Showing 6 changed files with 1,775 additions and 56 deletions.
4 changes: 2 additions & 2 deletions api/api_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ app.get("/", (req, res) => {
});

// 404 Error Handler (for any unhandled routes)
app.use((req, res, next) => {
app.use((req, res) => {
res.status(404).send("Resource not found");
});

// Generic Error Handler
app.use((error, req, res, next) => {
app.use((error, req, res) => {
console.error(error.stack);
res.status(500).send('Something broke!');
});
9 changes: 1 addition & 8 deletions api/atmRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ router.get("/api/atms", async (req, res) => {

router.post("/api/atms/filter", async (req, res) => {
try {
const defaultAccessibility = ["AudioCashMachine", "WheelchairAccess"];
const defaultATMServices = [
"CashWithdrawal",
"CashDeposits",
"PINChange",
"ChequeDeposits",
"Balance",
];


const atms = await db
.collection("ATMs")
Expand Down
3 changes: 2 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node api_server.js"
"start": "node api_server.js",
"lint": "eslint ."
},
"author": "",
"license": "ISC",
Expand Down
Loading

0 comments on commit 255a244

Please sign in to comment.