v6 update

This commit is contained in:
Mohit Panjwani
2022-01-10 16:06:17 +05:30
parent b770e6277f
commit bdea879273
722 changed files with 19047 additions and 9186 deletions

View File

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