Merge pull request #7581 from turbo124/v5-develop

checks for access token property
This commit is contained in:
David Bomba 2022-06-22 18:55:04 +10:00 committed by GitHub
commit 77cdae7907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -498,6 +498,8 @@ class LoginController extends BaseController
{
if(request()->has('accessToken'))
$accessToken = request()->input('accessToken');
elseif(request()->has('access_token'))
$accessToken = request()->input('access_token');
else
return response()->json(['message' => 'Invalid response from oauth server'], 400);

View File

@ -220,6 +220,7 @@ class Statement
protected function getInvoices(): \Illuminate\Support\LazyCollection
{
return Invoice::withTrashed()
->with('payments.type')
->where('is_deleted', false)
->where('company_id', $this->client->company_id)
->where('client_id', $this->client->id)