poter visualizzare i propri beni e servizi anche se non sei registrato alla app !
This commit is contained in:
@@ -16,6 +16,17 @@ const authenticate = (req, res, next) => {
|
||||
|
||||
// console.log('authenticate... ');
|
||||
|
||||
let noaut = false;
|
||||
|
||||
if (req.body.hasOwnProperty('noaut')) {
|
||||
noaut = req.body.noaut;
|
||||
}
|
||||
|
||||
if (noaut) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
const access = 'auth';
|
||||
|
||||
User.findByToken(token, access).then((user) => {
|
||||
|
||||
Reference in New Issue
Block a user