aboutsummaryrefslogtreecommitdiff
path: root/interface/controllers/citizens.controller.js
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-04-25 15:27:15 -0400
committerBobby <[email protected]>2022-04-25 15:27:15 -0400
commita96c3bc9177ef34d76a616f61eaf4f9a64ead363 (patch)
tree22b5d8cd48da260fae96035003dea2ab1795b407 /interface/controllers/citizens.controller.js
parentfc6c6db3dd3864049a1be73953c06cd244138c33 (diff)
downloadWelfare-Schemes-DMQL-a96c3bc9177ef34d76a616f61eaf4f9a64ead363.tar.xz
Welfare-Schemes-DMQL-a96c3bc9177ef34d76a616f61eaf4f9a64ead363.zip
render ejs template
Diffstat (limited to 'interface/controllers/citizens.controller.js')
-rw-r--r--interface/controllers/citizens.controller.js10
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."
- });
});
}