From 29111fd8d54c49051040e361eaba83e81a2dde1d Mon Sep 17 00:00:00 2001 From: Roy Zahor Date: Wed, 10 May 2017 23:15:41 +0300 Subject: [PATCH] Gate system - fixing API (#378) * Adding script from eyal. and making initial adjustments * Working script * Working include everything to sync from Drupal * Working include everything to sync from Drupal * Spark integration :-) * Code fixes after 'npm test' * Implementing get-ticket and some sync bug fixes * Implementing pass-ticket * More implementations and bug fixes * Small fixes * Small fixes * Fixing migrations * Major refactoring, better implementations * Adding pool name * Gate UI * Code cleanup * Refactoring to user groups * Camps data migration * Migrations fix * Migrations fix * login bug fix - problem with camps code * Small code reorganization * Switching to Node 7.9.0 * Gate server development * Migrations fix * Bug fixes * Bug fixes --- routes/api_gate_routes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/api_gate_routes.js b/routes/api_gate_routes.js index 4ad2c0672..fe8021909 100644 --- a/routes/api_gate_routes.js +++ b/routes/api_gate_routes.js @@ -91,9 +91,9 @@ router.post('/get-ticket/', async function (req, res) { gender: ticket.relations.holder.attributes.gender, type: ticket.attributes.type, inside_event: ticket.attributes.inside_event, - entrance_timestamp: ticket.attributes.entrance_timestamp.getTime(), - first_entrance_timestamp: ticket.attributes.first_entrance_timestamp.getTime(), - last_exit_timestamp: ticket.attributes.last_exit_timestamp.getTime(), + entrance_timestamp: ticket.attributes.entrance_timestamp ? ticket.attributes.entrance_timestamp.getTime() : null, + first_entrance_timestamp: ticket.attributes.first_entrance_timestamp ? ticket.attributes.first_entrance_timestamp.getTime() : null, + last_exit_timestamp: ticket.attributes.last_exit_timestamp ? ticket.attributes.last_exit_timestamp.getTime(): null, entrance_group_id: ticket.attributes.entrance_group_id, groups: groups };