From e0e33081b63c3d7eeda77652eb01b6bfe5ebba37 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Wed, 6 Apr 2022 18:22:17 +0100 Subject: [PATCH] Improve make request nano health controller v2 --- application/controllers/NanoHealthController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/controllers/NanoHealthController.php b/application/controllers/NanoHealthController.php index 29c1a7fc..cbdd4669 100644 --- a/application/controllers/NanoHealthController.php +++ b/application/controllers/NanoHealthController.php @@ -410,9 +410,8 @@ class NanoHealthController extends CI_Controller private function makeRequest($method , $path , $request_body = []){ if(!$this->isLogged()) { - return json_encode(['status' => 500]); + return json_encode(['status' => 401]); } - $url = NANO_SANTE_SERVICE_URL.$path; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);