Improve make request nano health controller v2
This commit is contained in:
parent
eca79fcabb
commit
e0e33081b6
|
@ -410,9 +410,8 @@ class NanoHealthController extends CI_Controller
|
||||||
|
|
||||||
private function makeRequest($method , $path , $request_body = []){
|
private function makeRequest($method , $path , $request_body = []){
|
||||||
if(!$this->isLogged()) {
|
if(!$this->isLogged()) {
|
||||||
return json_encode(['status' => 500]);
|
return json_encode(['status' => 401]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = NANO_SANTE_SERVICE_URL.$path;
|
$url = NANO_SANTE_SERVICE_URL.$path;
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
|
||||||
|
|
Loading…
Reference in New Issue