From 3d962b1b1e8adff4747a8f0087945436e5de64f0 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Mon, 24 Dec 2018 12:09:01 -0600 Subject: [PATCH] troubleshooting --- app/Library/Finances/Helper/FinanceHelper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Library/Finances/Helper/FinanceHelper.php b/app/Library/Finances/Helper/FinanceHelper.php index 100ac2b29..f79465fb9 100644 --- a/app/Library/Finances/Helper/FinanceHelper.php +++ b/app/Library/Finances/Helper/FinanceHelper.php @@ -10,6 +10,7 @@ namespace App\Library\Finances\Helper; use DB; use App\Models\User\UserToCorporation; +use App\Models\Esi\EsiToken; use App\Library\Esi; use App\Library\Finances\MarketTax; @@ -25,7 +26,7 @@ class FinanceHelper { public function GetWalletJournal($division, $charId) { //Get hte ESI token for the corporation to add new wallet journals into the database - $token = DB::table('EsiTokens')->where('character_id', $charId)->get(); + $token = EsiToken::where('character_id', $charId)->get(); //Reference to see if the character is in our look up table for corporations and characters $corpId = $this->GetCharCorp($charId); @@ -39,7 +40,7 @@ class FinanceHelper { $authentication = new EsiAuthentication([ 'client_id' => $config['client_id'], 'secret' => $config['secret'], - 'refresh_token' => $token[0]->refresh_token, + 'refresh_token' => $token->refresh_token, ]); //Create the esi class varialble