JSFiddle - React, Tailwind, and code Playground
by Tomek
JavaScript
self.getOpenTickets = function(params){
openTicketsTime = (new Date()).getTime();
var openTicketsParams = {
"GUI_type" : params.GUI_type
};
return sendEInstPostRequest(requests.igs.open, openTicketsParams).then(function(response){
//startPromise success (HTTP 2xx)
cur_player_id = response.player_id;
return response; //promise returned by this then will be resolved with response
}, function(response){
//startPromise fail (HTTP 4xx or 5xx)
return response; //promise returned by this then will be resolved with response
});
}