config for esi
This commit is contained in:
@@ -101,7 +101,7 @@ class FleetsController extends Controller
|
|||||||
$fleet = DB::table('Fleets')->where('fleet', $fleetId)->get();
|
$fleet = DB::table('Fleets')->where('fleet', $fleetId)->get();
|
||||||
//Add a pilot to the fleet
|
//Add a pilot to the fleet
|
||||||
$error = $newPilot->AddPilot($fleet[0]->character_id, $charId, $fleetId);
|
$error = $newPilot->AddPilot($fleet[0]->character_id, $charId, $fleetId);
|
||||||
|
dd($error);
|
||||||
return view('/dashboard')->with('success', $error);
|
return view('/dashboard')->with('success', $error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,11 +87,16 @@ class Fleet {
|
|||||||
public function AddPilot($fc, $charId, $fleetId) {
|
public function AddPilot($fc, $charId, $fleetId) {
|
||||||
//Check if the fc has the right scope
|
//Check if the fc has the right scope
|
||||||
if(!$this->HaveEsiScope($fc, 'esi-fleets.write_fleet.v1')) {
|
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
|
//Get the ESI token for the FC to add the new pilot
|
||||||
$token = DB::table('EsiTokens')->where('character_id', $fc->character_id)->first();
|
$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
|
//Create the ESI Call Container
|
||||||
$authentication = new EsiAuthentication([
|
$authentication = new EsiAuthentication([
|
||||||
'client_id' => env('ESI_CLIENT_ID'),
|
'client_id' => env('ESI_CLIENT_ID'),
|
||||||
@@ -107,7 +112,7 @@ class Fleet {
|
|||||||
'fleet_id' => $fleetId,
|
'fleet_id' => $fleetId,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $error;
|
return 'Invite Sent';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function RenderFleetDisplay() {
|
public function RenderFleetDisplay() {
|
||||||
|
|||||||
Reference in New Issue
Block a user