From 1956a1db1103cdc88c5bf43a61ce392d04f2b1f0 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Thu, 12 Dec 2019 00:20:03 -0600 Subject: [PATCH] esi issue --- app/Library/Lookups/LookupHelper.php | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/app/Library/Lookups/LookupHelper.php b/app/Library/Lookups/LookupHelper.php index d4699f10e..976188d6c 100644 --- a/app/Library/Lookups/LookupHelper.php +++ b/app/Library/Lookups/LookupHelper.php @@ -30,7 +30,7 @@ class LookupHelper { //Declare a variable for use by the construct $esiHelper = new Esi; - $this->esi = $esiHelper->SetupEsiAuthentication(); + $this->esi = $esiHelper->SetupEsiAuthentication(null); } public function ItemIdToName($itemId) { @@ -151,24 +151,16 @@ class LookupHelper { //Check our own database first $char = $this->LookupCharacter($charId, null); - try { - printf("Attemping esi call"); - $response = $this->esi->invoke('get', '/characters/{character_id}/', [ - 'character_id' => $charId, - ]); - } catch(RequestFailedException $e) { - Log::warning('Failed to get character information in GetCharacterInfo in Lookup'); - printf("Failed ESI Call."); - - dd($e); - return null; - } - - dd($response); - //if the character was not found in the database, then get the information and store it in our database for later if($char == null) { - + try { + $response = $this->esi->invoke('get', '/characters/{character_id}/', [ + 'character_id' => $charId, + ]); + } catch(RequestFailedException $e) { + Log::warning('Failed to get character information in GetCharacterInfo in Lookup'); + return null; + } //Store the character in our database $this->SaveCharacter($response, $charId);