{"size": 998, "ext": "js", "max_stars_repo_path": "cdk/ts/assets/status-api/program.js", "max_stars_repo_name": "sundgaard-aws/iac-templates", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "cdk/ts/assets/status-api/program.js", "max_issues_repo_name": "sundgaard-aws/iac-templates", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "cdk/ts/assets/status-api/program.js", "max_forks_repo_name": "sundgaard-aws/iac-templates", "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": 29.3529411765, "max_line_length": 77, "alphanum_fraction": 0.5230460922}
const { getuid } = require("process");

//get-validation-status-api
function Program() {
    this.main = function(event) {
        //validateToken(event);        
        return reply(event);
    };
   
    var reply = function(event) {
        var allowedHeaders = "*";
        var allowedOrigin = "*";
        //var allowedOrigin = "https://octa-trading.sundgaar.people.aws.dev";
        
        var trade = event.trade;
        trade.TradeStatus = "VALID";
        const response = {
            statusCode: 200,
            headers: {
                "Access-Control-Allow-Headers" : allowedHeaders,
                "Access-Control-Allow-Origin": allowedOrigin,
                "Access-Control-Allow-Methods": "OPTIONS,POST,GET",
                "Content-Type": "application/json"
            },
            body: JSON.stringify({ status: "success"}),
            refinedInput: { 
                trade: trade
            }
        };
        return response;
    };
}

module.exports=Program;