Skip to content

Commit

Permalink
fix serverhost
Browse files Browse the repository at this point in the history
  • Loading branch information
jhowbhz committed Jan 22, 2022
1 parent d60b556 commit 59f4350
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ApiBrasil.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public static function WhatsAppService(string $action = '', array $data = []) {
$sessionkey = $data['sessionkey'] ?? '';
$apitoken = $data['apitoken'] ?? '';
$session = $data['session'] ?? '';
$server_host = $server_host."/".$action;
$serverhost = $serverhost."/".$action;

//clear data after send body
$clear = ['server_host', 'apitoken', 'method'];
$clear = ['serverhost', 'apitoken', 'method'];
$body = array_diff_key($data, array_flip($clear));
$header = array(
'Content-Type: application/json',
Expand All @@ -49,7 +49,7 @@ public static function WhatsAppService(string $action = '', array $data = []) {

//send parameters qrcode get
if(isset($action) and $action === 'qrcode'){
$serverhost = $serverhost."/".$action."?session=$session&sessionkey=$sessionkey"
$serverhost = $serverhost."/".$action."?session=$session&sessionkey=$sessionkey";
}

//request default
Expand Down

0 comments on commit 59f4350

Please sign in to comment.