{"size": 930, "ext": "js", "max_stars_repo_path": "tracking/functions/tracking.js", "max_stars_repo_name": "vineetseraro/gps-ble-based-guard-trak", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tracking/functions/tracking.js", "max_issues_repo_name": "vineetseraro/gps-ble-based-guard-trak", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tracking/functions/tracking.js", "max_forks_repo_name": "vineetseraro/gps-ble-based-guard-trak", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.1351351351, "max_line_length": 75, "alphanum_fraction": 0.5548387097}
/*jshint esversion: 6 */
/*jshint node: true */
'use strict';

/**
 * Process Points Lambda Function
 * @constructor
 */
module.exports.handler = (event, context, callback) => {
    
    const UtilityLib = require("../lib/utility");
    const utility = new UtilityLib();

    const LambdaLib = require("../lib/aws/lambda");
    const lambda = new LambdaLib();

    try {
        event.trLbdTm = new Date();
        lambda.executeAsync(process.env.pointLocationLambda, event, () => {
          utility.debug("Request transferred");
          callback(null, utility.successResponse({
              httpCode: 200,
              message: 'Tracking function executed successfully!'
              //results: results
          }));
        });
        
        
    } catch(err) {
        callback(utility.errorResponse({
            httpCode: 502,
            errorCode: err.code,
            message: err.message
        }));
    }
};
