Carrello Spesa

This commit is contained in:
Paolo Arena
2020-12-25 03:54:16 +01:00
parent 67d2872e61
commit 142380e54b
12 changed files with 736 additions and 214 deletions

View File

@@ -4,6 +4,13 @@ var { User } = require('../models/user');
const tools = require('../tools/general');
const auth_default = (req, res, next) => {
if (req.body.keyappid === process.env.KEY_APP_ID)
next();
};
const authenticate = (req, res, next) => {
const token = req.header('x-auth');
@@ -71,4 +78,4 @@ const authenticate_noerror = (req, res, next) => {
});
};
module.exports = { authenticate, authenticate_noerror };
module.exports = { authenticate, authenticate_noerror, auth_default };