mirror of
https://github.com/crater-invoice/crater.git
synced 2025-12-16 02:12:54 -05:00
v6 update
This commit is contained in:
@@ -9,16 +9,15 @@ use GuzzleHttp\Exception\RequestException;
|
||||
// Implementation taken from Akaunting - https://github.com/akaunting/akaunting
|
||||
trait SiteApi
|
||||
{
|
||||
protected static function getRemote($url, $data = [])
|
||||
protected static function getRemote($url, $data = [], $token = null)
|
||||
{
|
||||
$base = 'https://craterapp.com/';
|
||||
|
||||
$client = new Client(['verify' => false, 'base_uri' => $base]);
|
||||
$client = new Client(['verify' => false, 'base_uri' => config('crater.base_url').'/']);
|
||||
|
||||
$headers['headers'] = [
|
||||
'Accept' => 'application/json',
|
||||
'Referer' => url('/'),
|
||||
'crater' => Setting::getSetting('version'),
|
||||
'Authorization' => "Bearer {$token}",
|
||||
];
|
||||
|
||||
$data['http_errors'] = false;
|
||||
|
||||
Reference in New Issue
Block a user