CHANGE_API

This commit is contained in:
venba-Inspriron-3558 2025-08-19 15:57:57 +05:30
parent f827b83e7c
commit 1c2a473c5a

View File

@ -110,14 +110,17 @@ class ThzController extends BaseController
->where('thz_master.thz_id', $thz_id)
->findAll();
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id);
$result['notes'] = !empty($notes) ? $notes : [];
if(!empty($result['master'])){
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id);
$result['notes'] = !empty($notes) ? $notes : [];
}else{
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets master found']))->setStatusCode(400);
}
}else{
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
}
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(400);
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
}