api changes

This commit is contained in:
gandhimathi 2018-08-30 16:22:47 +05:30
parent 5a3e65d9ed
commit 5bdb382528
2 changed files with 9 additions and 3 deletions

View File

@ -133,16 +133,22 @@ class Receive_Enrolment_Fees_Univ_Controller extends REST_Controller {
$getDetails = $this->receive_model->getFormIDFeeDetails($formData); $getDetails = $this->receive_model->getFormIDFeeDetails($formData);
if ($getDetails['Status']=true) if ($getDetails['Status']=true)
{ {
$getDetails['status'] =REST_Controller::HTTP_OK; $getDetails['status'] =true;
// Set the response and exit // Set the response and exit
$this->response($getDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code $this->response($getDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} }
else if($getDetails['Status']=false){
$this->response([
'message' => $getDetails['Message'],
'status' => false
], REST_Controller::HTTP_OK); // NOT_FOUND (404) being the HTTP response code
}
else else
{ {
// Set the response and exit // Set the response and exit
$this->response([ $this->response([
'message' => 'Something went wrong.please try again!', 'message' => 'Something went wrong.please try again!',
'status' => REST_Controller::HTTP_NOT_FOUND 'status' => false
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
} }
} }

View File

@ -301,7 +301,7 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil
}; };
$http(getFeeCompareDetailsList).then(function (response) { $http(getFeeCompareDetailsList).then(function (response) {
if (response.data.stuFeeList == true) { if (response.data.status == true) {
$scope.popupLoad = false; $scope.popupLoad = false;
$scope.popupLoadData = true; $scope.popupLoadData = true;
} else { } else {