diff --git a/app/Jobs/ProcessStructureJob.php b/app/Jobs/ProcessStructureJob.php index d749e85ad..0e1023f03 100644 --- a/app/Jobs/ProcessStructureJob.php +++ b/app/Jobs/ProcessStructureJob.php @@ -65,7 +65,7 @@ class ProcessStructureJob implements ShouldQueue //Setup the esi authentication container $config = config('esi'); //Get the refresh token from the database - $token = EsiToken::where(['character_id' => $this->charId])->get(['refresh_token', 'id']); + $token = EsiToken::where(['character_id' => $this->charId])->get(['refresh_token']); $authentication = new EsiAuthentication([ 'client_id' => $config['client_id'], 'secret' => $config['secret'], diff --git a/app/Library/Structures/StructureHelper.php b/app/Library/Structures/StructureHelper.php index 84a276a1e..f16312456 100644 --- a/app/Library/Structures/StructureHelper.php +++ b/app/Library/Structures/StructureHelper.php @@ -63,14 +63,16 @@ class StructureHelper { } if(isset($structure->unanchors_at)) { $struct->unanchors_at = $structure->unanchors_at; - } + } + //Save the database record + $struct->save(); + //If we set the structure services to true, let's save the services if($structure->services == true) { $this->StorestructureServices($structure->services, $structure->structure_id); } - //Save the database record - $struct->save(); + } public function UpdateExistingStructure($structure, $info, $solarName) {