aboutsummaryrefslogtreecommitdiff
path: root/interface/controllers/mandal.controller.js
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-05-03 20:55:34 -0400
committerBobby <[email protected]>2022-05-03 20:55:34 -0400
commit7051c250ba6e1879e5b19c993bf38e8745740706 (patch)
treef5c255b3636a0ce10b3d8b60c51936a23b0432fb /interface/controllers/mandal.controller.js
parent038298fc140f8f1e0bcba02bb422ab0309a73911 (diff)
downloadWelfare-Schemes-DMQL-7051c250ba6e1879e5b19c993bf38e8745740706.tar.xz
Welfare-Schemes-DMQL-7051c250ba6e1879e5b19c993bf38e8745740706.zip
citizen adding working
Diffstat (limited to 'interface/controllers/mandal.controller.js')
-rw-r--r--interface/controllers/mandal.controller.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/interface/controllers/mandal.controller.js b/interface/controllers/mandal.controller.js
index 43842fe..5e4d287 100644
--- a/interface/controllers/mandal.controller.js
+++ b/interface/controllers/mandal.controller.js
@@ -11,6 +11,10 @@ exports.allMandals = () => {
exports.allMandalsByDistrictId = (district_id) => {
const query =`SELECT * FROM mandal_master WHERE district_id = ${district_id}`;
- return db.sequelize.query(query, { type: db.sequelize.QueryTypes.SELECT });
-
+ return db.sequelize.query(query, { type: db.sequelize.QueryTypes.SELECT }).then(mandals => {
+ if (mandals) {
+ return mandals;
+ }
+ return null;
+ });
};