aboutsummaryrefslogtreecommitdiff
path: root/interface/controllers/citizens.controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'interface/controllers/citizens.controller.js')
-rw-r--r--interface/controllers/citizens.controller.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/interface/controllers/citizens.controller.js b/interface/controllers/citizens.controller.js
new file mode 100644
index 0000000..64522b1
--- /dev/null
+++ b/interface/controllers/citizens.controller.js
@@ -0,0 +1,11 @@
+const db = require("../models");
+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 = () => {
+ const limit = 10;
+ return citizens.findAll({
+ limit: limit
+ });
+}