|
@@ -7,14 +7,14 @@ class Authorization {
|
|
|
_parseToken(req, res, next) {
|
|
|
const token = req.query.token;
|
|
|
if(!token)return next();
|
|
|
- console.log("Token parsing : " + token);
|
|
|
+ // console.log("Token parsing : " + token);
|
|
|
UserRepository.getUser(token).
|
|
|
then((user) => {
|
|
|
req.user = user;
|
|
|
next();
|
|
|
}).
|
|
|
catch((err) => {
|
|
|
- next(err);
|
|
|
+ res.sendStatus(400);
|
|
|
});
|
|
|
}
|
|
|
getTokenParser() {
|