changing to user and error code for forbidden

This commit is contained in:
Arjun Patel
2019-01-28 13:16:24 -08:00
parent e77b31a8f2
commit 6ca8807a9b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ exports.login = (type, role) => (req, res, next) => {
);
return res.status(200).json({
message: 'Auth successful',
donor: users[0],
user: users[0],
token
});
}
+1 -1
View File
@@ -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);
}
};