- 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:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user