From 7515d0e68917936ab93e756eab68711f81962877 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 22 Jun 2022 11:47:14 +1000 Subject: [PATCH 1/2] checks for access token property --- app/Http/Controllers/Auth/LoginController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index c3124824b39a..8e34d1c072b1 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -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); From 444b3f2375e025c8a75f57d3b413fb8683ed4b36 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 22 Jun 2022 14:26:10 +1000 Subject: [PATCH 2/2] Improve queries for client statements --- app/Services/Client/Statement.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/Client/Statement.php b/app/Services/Client/Statement.php index b96e4b51ff12..93f9b783768a 100644 --- a/app/Services/Client/Statement.php +++ b/app/Services/Client/Statement.php @@ -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)