Name generation and gradient calculation

This commit is contained in:
Ben Grant 2021-03-04 19:00:38 +11:00
parent 8e5954e0ca
commit ba1697ffc7
12 changed files with 418 additions and 54 deletions

View file

@ -7,9 +7,13 @@ module.exports = async (req, res) => {
try {
const event = (await req.datastore.get(req.datastore.key(['Event', eventId])))[0];
const query = req.datastore.createQuery('Person')
.filter('eventId', eventId)
.filter('name', person.name);
let personResult = (await req.datastore.runQuery(query))[0][0];
if (event) {
if (person) {
if (person && personResult === undefined) {
const currentTime = dayjs().unix();
// If password