Create event with API and load event details

This commit is contained in:
Ben Grant 2021-03-03 15:37:27 +11:00
parent 855477570f
commit 8e5954e0ca
19 changed files with 349 additions and 58 deletions

View file

@ -7,8 +7,8 @@ module.exports = async (req, res) => {
try {
const query = req.datastore.createQuery(['__Stat_Kind__']);
eventCount = (await req.datastore.runQuery(query.filter('kind_name', 'Event')))[0].count;
personCount = (await req.datastore.runQuery(query.filter('kind_name', 'Person')))[0].count;
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;
} catch (e) {
console.error(e);
}