Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(API): lint fix #207

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading