changing to user and error code for forbidden
This commit is contained in:
@@ -14,7 +14,7 @@ module.exports = role => (req, res, next) => {
|
||||
next();
|
||||
} catch (error) {
|
||||
error.message = 'Check Auth Error';
|
||||
error.status = 401;
|
||||
error.status = 403;
|
||||
return next(error);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user