public function getConsultant() { $company_service_id = intval($this->request->param('COMPANY_SERVICE_ID')); $consultant = $this->consultant_repository->getById($company_service_id); if (!$consultant) { return $this->notFound(); } return $this->ok(ConsultantAssembler::convertConsultantToArray($consultant)); }
public function getCurrentConsultantJson() { $consultant = $this->getCurrentConsultant(); if ($consultant) { return json_encode(ConsultantAssembler::convertConsultantToArray($consultant)); } }