Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
acifani committed Oct 10, 2024
1 parent 576b2e1 commit 8993fb1
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 118 deletions.
8 changes: 5 additions & 3 deletions auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Request, Response, NextFunction } from 'express';
import type { NextFunction, Request, Response } from 'express';

const authToken = process.env.AUTH_TOKEN;
const authEnabled = !!authToken && authToken.length > 0;
Expand All @@ -11,9 +11,11 @@ export function authMiddleware(
if (authEnabled) {
const incomingToken = req.headers['authorization'] || req.query['token'];
if (incomingToken !== authToken) {
return res.sendStatus(403);
res.sendStatus(403);
return;
}
}

return next();
next();
return;
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"author": "Alessandro Cifani <alessandro.cifani@gmail.com>",
"license": "MIT",
"dependencies": {
"@actual-app/api": "^6.10.0",
"express": "5.0.0-beta.3"
"@actual-app/api": "^24.10.1",
"express": "^5.0.1"
},
"devDependencies": {
"@types/express": "^4.17.21",
"typescript": "^5.6.2"
"@types/express": "^5.0.0",
"typescript": "^5.6.3"
}
}
Loading

0 comments on commit 8993fb1

Please sign in to comment.