Good morning, I have REST enabled Coldfusion functions that have been tested in Postman and are working correctly, inserting data from a new event into my database. I have implemented REST functions to set the events and calendars as follows:
class MyBackend extends scheduler.services.Backend {
events(params) {
return webix
.ajax("https://MyAPICalendarEventsRestPath")
.then(res => res.json());
}
calendars() {
return webix
.ajax("https://MyAPICalendarsRestPath")
.then(res => res.json());
}
}
When it comes to a Post or Put function, I have tried the below to no avail:
addEvent(obj) {
return webix
.ajax.post("https://MyAPIPostPath?start_date=obj.start_date&end_date=obj.end_date&text=obj.text&details=obj.details&color=obj.color&calendar=obj.calendar")
.then(res => res.json());
//return webix.promise.resolve(obj);
}
Any hint or assistance in using the Put and Post functions would be greatly appreciated.
Thanks,
-Daniel