JSON output improved

This commit is contained in:
paolo
2016-04-22 11:08:38 +02:00
parent 4e02a1105b
commit 346b8c82e1
6 changed files with 71 additions and 69 deletions
@@ -34,12 +34,12 @@ class Plan extends REST_Controller
$result = $this->PlanModel->getCurricula($courseOfStudiesID);
if(!is_null($result) && $result->num_rows() > 0)
if(is_object($result))
{
$payload = [
'success' => TRUE,
'message' => 'Curricula found',
'data' => $result->result()[0]
'data' => $result->result()
];
$httpstatus = REST_Controller::HTTP_OK;
}