From 16f94aac77e68ceba303622e4fd123b9478a5ba9 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sat, 28 Dec 2019 23:46:58 -0600 Subject: [PATCH] entity stuff for blacklist' --- app/Library/Lookups/LookupHelper.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Library/Lookups/LookupHelper.php b/app/Library/Lookups/LookupHelper.php index 149013f6c..bc51c824b 100644 --- a/app/Library/Lookups/LookupHelper.php +++ b/app/Library/Lookups/LookupHelper.php @@ -310,13 +310,13 @@ class LookupHelper { public function CorporationNameToId($corpName) { //Check if the corporation is stored in our own database first $corp = $this->LookupCorporation(null, $corpName); - dd($corp); + if($corp != null) { return $corp->corporation_id; } else { //Try to get the corporation details from ESI try { - $corporation = $this->esi->setBody(array( + $response = $this->esi->setBody(array( $corpName, ))->invoke('post', '/universe/ids/'); } catch(RequestFailedException $e) { @@ -324,6 +324,8 @@ class LookupHelper { return null; } + dd($response); + if(isset($response->corporations[0]->id)) { $this->StoreCorporationLookup($response->corporations[0]->id, null);