Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
rhnmht30 committed Sep 30, 2019
1 parent dc75cba commit b2ec85c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions controllers/admin_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ module.exports.donors = async (req, res) => {
} else {
donors = await BloodDonor.find().sort({ createdAt: "desc" });
}
if (donors.length !== 0) {
res.status(200).json({ message: "success", donors });
}

res.status(200).json({ message: "success", donors });
} catch (err) {
res.status(500).json({ message: err.message, error: true, data: null });
}
Expand Down

0 comments on commit b2ec85c

Please sign in to comment.