Skip to content

Commit

Permalink
Return
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Apr 23, 2020
1 parent b69d2ef commit bbc5e3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public function create($metric)
$this->metric = $metric;
$this->metric->datetime = date("Y-m-d H:i:s");
$this->metric->api_key = config('collector.api_key');

return $this;
}

public function increment()
Expand Down
2 changes: 1 addition & 1 deletion src/Collector/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private function httpClient()
return new \GuzzleHttp\Client(['headers' => ['X-API-KEY' => $this->apiKey()]]);
}

private function fire($metric)
public function fire($metric)
{
$client = $this->httpClient();
$response = $client->request('POST',$this->endPoint(), ['form_params' => $metric]);
Expand Down

0 comments on commit bbc5e3d

Please sign in to comment.