diff options
Diffstat (limited to 'interface/controllers/citizens.controller.js')
| -rw-r--r-- | interface/controllers/citizens.controller.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/interface/controllers/citizens.controller.js b/interface/controllers/citizens.controller.js index fef549d..64522b1 100644 --- a/interface/controllers/citizens.controller.js +++ b/interface/controllers/citizens.controller.js @@ -3,15 +3,9 @@ const citizens = db.citizens; const op = db.Sequelize.Op; // Retrieve all citizens from the database. Limit the number of citizens returned to 10. -exports.findXCitizens = (req, res) => { +exports.findXCitizens = () => { const limit = 10; - citizens.findAll({ + return citizens.findAll({ limit: limit - }).then(citizens => { - res.send(citizens); - }).catch(err => { - res.status(500).send({ - message: err.message || "Some error occurred while retrieving citizens." - }); }); } |
