TimetableAPI-Upgrade #64

Merged
fred.boniface merged 36 commits from TimetableAPI-Upgrade into main 2024-02-11 15:53:17 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 59a75f811d - Show all commits

View File

@ -12,6 +12,7 @@
"scripts": {
"build": "tsc",
"run": "tsc && node dist/app.js",
"dev": "NODE_ENV=development tsc && node dist/app.js",
"start": "node app.js",
"test": "jest",
"format": "npx prettier -w ."

View File

@ -4,6 +4,11 @@ const logger = require("../utils/logger.utils");
module.exports = async function authCheck(req, res, next) {
//log.out("authMiddlewares: Checking authentication", "dbug");
logger.logger.debug("Auth check starting");
if (process.env.NODE_ENV === "development") {
logger.logger.warn("DEVELOPMENT MODE - AUTHENTICATION DISABLED")
res.isAuthed = true;
return next()
}
try {
var uuid = req.headers.uuid;
} catch (err) {