Time zone support

This commit is contained in:
Ben Grant 2021-03-05 04:03:56 +11:00
parent ba1697ffc7
commit 76a36ed35f
16 changed files with 315 additions and 189 deletions

View file

@ -5,10 +5,11 @@ module.exports = async (req, res) => {
let personCount = null;
try {
const query = req.datastore.createQuery(['__Stat_Kind__']);
const eventQuery = req.datastore.createQuery(['__Stat_Kind__']).filter('kind_name', 'Event');
const personQuery = req.datastore.createQuery(['__Stat_Kind__']).filter('kind_name', 'Person');
eventCount = (await req.datastore.runQuery(query.filter('kind_name', 'Event')))[0][0].count;
personCount = (await req.datastore.runQuery(query.filter('kind_name', 'Person')))[0][0].count;
eventCount = (await req.datastore.runQuery(eventQuery))[0][0].count;
personCount = (await req.datastore.runQuery(personQuery))[0][0].count;
} catch (e) {
console.error(e);
}