Dev database

This commit is contained in:
Ben Grant 2021-04-12 13:06:10 +10:00
parent 01a9b55b6a
commit ad9863f2de
10 changed files with 17 additions and 13 deletions

View file

@ -5,8 +5,8 @@ module.exports = async (req, res) => {
let personCount = null;
try {
const eventQuery = req.datastore.createQuery(['__Stat_Kind__']).filter('kind_name', 'Event');
const personQuery = req.datastore.createQuery(['__Stat_Kind__']).filter('kind_name', 'Person');
const eventQuery = req.datastore.createQuery(['__Stat_Kind__']).filter('kind_name', req.types.event);
const personQuery = req.datastore.createQuery(['__Stat_Kind__']).filter('kind_name', req.types.person);
eventCount = (await req.datastore.runQuery(eventQuery))[0][0].count;
personCount = (await req.datastore.runQuery(personQuery))[0][0].count;