From 444195cb207158c335367c88450bf978734817c9 Mon Sep 17 00:00:00 2001 From: mikael-zakaria Date: Mon, 20 Oct 2025 15:12:52 +0700 Subject: [PATCH] Update unit testing patvisit --- app/Controllers/PatVisit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Controllers/PatVisit.php b/app/Controllers/PatVisit.php index 603b307..4eb42ad 100644 --- a/app/Controllers/PatVisit.php +++ b/app/Controllers/PatVisit.php @@ -45,7 +45,7 @@ class PatVisit extends BaseController { public function update() { $input = $this->request->getJSON(true); try { - if(empty($input)){throw new \Exception('Input data is empty or invalid');} + // if(empty($input)){throw new \Exception('Input data is empty or invalid');} if (!$input["InternalPVID"] || !is_numeric($input["InternalPVID"])) { return $this->respond(['status' => 'error', 'message' => 'Invalid or missing ID'], 400); } $data = $this->model->updatePatVisit($input); return $this->respond(['status' => 'success', 'message' => 'Data updated successfully', 'data' => $data], 201); @@ -57,7 +57,7 @@ class PatVisit extends BaseController { public function create() { $input = $this->request->getJSON(true); try { - if(empty($input)){throw new \Exception('Input data is empty or invalid');} + // if(empty($input)){throw new \Exception('Input data is empty or invalid');} $data = $this->model->createPatVisit($input); return $this->respond(['status' => 'success', 'message' => 'Data created successfully', 'data' => $data], 201); } catch (\Exception $e) {