diff options
Diffstat (limited to 'interface/routes/index.js')
| -rw-r--r-- | interface/routes/index.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/interface/routes/index.js b/interface/routes/index.js index fcc7c14..12cd088 100644 --- a/interface/routes/index.js +++ b/interface/routes/index.js @@ -8,8 +8,12 @@ router.use('/api', api); router.get('/', (req, res) => { - res.render('index', { - title: 'Home Page' + Promise.all([citizensController.findGenderDistribution()]).then(results => { + const [genderDistribution] = results; + res.render('index', { + title: 'Home Page', + genderDistribution + }); }); }); |
