TimetableAPI-Upgrade #64
@ -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 ."
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user