Improve make request nano health controller v2

This commit is contained in:
Djery-Tom 2022-04-06 18:22:17 +01:00
parent eca79fcabb
commit e0e33081b6
1 changed files with 1 additions and 2 deletions

View File

@ -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);