Skip to content

Commit

Permalink
fix: case where checkAccountStatus were checking for wrong undefined …
Browse files Browse the repository at this point in the history
…field
  • Loading branch information
eowfenth committed Apr 29, 2020
1 parent 9464198 commit dd7c115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/user/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const encryptPassword = async (req, res, next) => {
};

const checkAccountStatus = async (req, res, next) => {
const { auth_user_id } = req.body;
const { auth_user_id } = req;

const user = await User.getOne(auth_user_id);

if (user.deleted_at) {
if (user && user.deleted_at) {
return res.json({
error: 403,
data: {
Expand Down

0 comments on commit dd7c115

Please sign in to comment.