TimetableAPI-Upgrade #64
@ -12,6 +12,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"run": "tsc && node dist/app.js",
|
"run": "tsc && node dist/app.js",
|
||||||
|
"dev": "NODE_ENV=development tsc && node dist/app.js",
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"format": "npx prettier -w ."
|
"format": "npx prettier -w ."
|
||||||
|
@ -4,6 +4,11 @@ const logger = require("../utils/logger.utils");
|
|||||||
module.exports = async function authCheck(req, res, next) {
|
module.exports = async function authCheck(req, res, next) {
|
||||||
//log.out("authMiddlewares: Checking authentication", "dbug");
|
//log.out("authMiddlewares: Checking authentication", "dbug");
|
||||||
logger.logger.debug("Auth check starting");
|
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 {
|
try {
|
||||||
var uuid = req.headers.uuid;
|
var uuid = req.headers.uuid;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user