let dataFlight = {};
dataFlight['flights'] = flights;
dataFlight['csrf_ws_name'] = $('.csrf').val();
console.log(dataFlight)
$.ajax({
url: "/api/set_api_flights",
type: "POST",
dataType: "json",
data: dataFlight,
success: function (res) {
///
}
});