Page 1 of 1

Problem with Todo tutorial

Posted: Thu Apr 28, 2016 3:01 pm
by DavidE

Problem with Create service generated by API Express.

I have been following, with great care, the Youtube tutorial "Building a To-Do App" from Sep 1st 2015 - following the steps in the tutorial whilst using my own database and data.

The list function works fine, proving that I have a working database connection. The create function, to add a row to the collection, does not work with the following message displayed in the console log:

POST https://api.appery.io/rest/1/apiexpre... 400 (Bad Request)

The generated code for the "add" function is as follows:

var requestData = {};
requestData = (function mapping5547($scope){
var requestData = {};
requestData = Apperyio.EntityAPI('APIExpress_create.request.data', undefined, true);

Code: Select all

 var bloodtest_scope = $scope.bloodtest; 
 requestData.DateOfTest = bloodtest_scope.DateOfTest; 
 requestData.LDHCholesterol = bloodtest_scope.LDHCholesterol; 
 requestData.HDLCholesterol = bloodtest_scope.HDLCholesterol; 
 requestData.Triglyceride = bloodtest_scope.Triglyceride; 
 requestData.TotalCholesterol = bloodtest_scope.TotalCholesterol; 

 return requestData; 

})($scope);

// read more about using rest services: https://devcenter.appery.io/documenta...
Apperyio.get("APIExpress_create")(requestData).then(

Code: Select all

 function(success){ // success callback 
     $scope.loadBloodTests(); 
     $scope.$apply(); 
 }, 
 function(error){ // callback to handle request error 
 }, 
 function(notify){ // notify callback, can fire few times 
 }); 

Thanks,

Dave


Problem with Todo tutorial

Posted: Fri Apr 29, 2016 9:05 am
by Serhii Kulibaba

Hello David,

Please send us full response from the server with that error (you can find it in the network tab of the browser (response tab))


Problem with Todo tutorial

Posted: Fri Apr 29, 2016 11:06 am
by Dave Ebbitt

Here you go, Sergiy .....

Image


Problem with Todo tutorial

Posted: Wed May 04, 2016 6:50 am
by Dave Ebbitt

Any thoughts, Sergiy?


Problem with Todo tutorial

Posted: Wed May 04, 2016 12:47 pm
by Serhii Kulibaba

Sorry, but I meant error response data from the server, this is an example: https://developer.chrome.com/devtools...