entity stuff for blacklist'

This commit is contained in:
2019-12-28 23:46:58 -06:00
parent 5fbea70f92
commit 16f94aac77

View File

@@ -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);