config for esi

This commit is contained in:
2018-11-13 22:44:13 -06:00
parent 1d347413d6
commit eb795dafd8
2 changed files with 8 additions and 3 deletions

View File

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

View File

@@ -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() {