- Enable Edit Event into dialog form ... (and save to the db)

- Event: enabled drag and drop (date)
- Q-Select components in every table field external: Where, Operators, etc...
- CMyEditor: Add HTML Editor to the details field !
- Added button Color for change font color to the text.
- Complete insert Events Site
This commit is contained in:
Paolo Arena
2019-10-23 23:47:21 +02:00
parent 570bbf3744
commit 51ca2da45f
8 changed files with 386 additions and 49 deletions

View File

@@ -30,4 +30,27 @@ const authenticate = (req, res, next) => {
});
};
module.exports = {authenticate};
const authenticate_noerror = (req, res, next) => {
const token = req.header('x-auth');
const access = 'auth';
User.findByToken(token, access).then((user) => {
if (!user) {
req.user = null;
req.token = null;
req.access = null;
}else {
req.user = user;
req.token = token;
req.access = access;
}
next();
}).catch((e) => {
req.user = null;
req.token = null;
req.access = null;
});
};
module.exports = {authenticate, authenticate_noerror};