diff --git a/app/Http/Controllers/FleetsController.php b/app/Http/Controllers/FleetsController.php index a556d25fb..d2c8bc3d7 100644 --- a/app/Http/Controllers/FleetsController.php +++ b/app/Http/Controllers/FleetsController.php @@ -101,7 +101,7 @@ class FleetsController extends Controller $fleet = DB::table('Fleets')->where('fleet', $fleetId)->get(); //Add a pilot to the fleet $error = $newPilot->AddPilot($fleet[0]->character_id, $charId, $fleetId); - + dd($error); return view('/dashboard')->with('success', $error); } diff --git a/app/Library/Fleet.php b/app/Library/Fleet.php index 4cedd4f77..da4f7e7c0 100644 --- a/app/Library/Fleet.php +++ b/app/Library/Fleet.php @@ -87,11 +87,16 @@ class Fleet { public function AddPilot($fc, $charId, $fleetId) { //Check if the fc has the right scope if(!$this->HaveEsiScope($fc, 'esi-fleets.write_fleet.v1')) { - return 1; + return 'Incorrect Scopes.'; } //Get the ESI token for the FC to add the new pilot $token = DB::table('EsiTokens')->where('character_id', $fc->character_id)->first(); + // Disable all caching by setting the NullCache as the + // preferred cache handler. By default, Eseye will use the + // FileCache. + $configuration = Configuration::getInstance(); + $configuration->cache = NullCache::class; //Create the ESI Call Container $authentication = new EsiAuthentication([ 'client_id' => env('ESI_CLIENT_ID'), @@ -107,7 +112,7 @@ class Fleet { 'fleet_id' => $fleetId, ]); - return $error; + return 'Invite Sent'; } public function RenderFleetDisplay() {