Can anyone tell me what is wrong with this code? When it runs, I get this error “Uncaught TypeError: webix.ajax(…).headers(…).get(…).sync is not a function.” If i remove .sync(), then it runs fine.
function getApplicationData(appId) {
url = “/apiv1/api.php/records/ent_appconfig?filter=id,eq,” + appId;
webix.ajax().headers({
“<?php echo $api_header_key?>”:"<?php echo $api_header_value?>",
“Access-Control-Allow-Origin”:"*"
}).get(url).sync().then(function(data){
app_data = JSON.parse(data.text());
console.log(app_data.data);
});
}