mining taxes testing

This commit is contained in:
2021-03-07 20:20:10 +09:00
parent cd474b7e7f
commit b746853520

View File

@@ -101,7 +101,7 @@ class MiningTaxesController extends Controller
} }
$refreshToken = $esiHelper->GetRefreshToken($config['primary']); $refreshToken = $esiHelper->GetRefreshToken($config['primary']);
$esi = $esiHelper->EsiSetupAuthentication($refreshToken); $esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Get the esi data for extractions //Get the esi data for extractions
try { try {
@@ -134,16 +134,19 @@ class MiningTaxesController extends Controller
public function DisplayExtractionCalendar() { public function DisplayExtractionCalendar() {
//Declare variables //Declare variables
$structures = array(); $structures = array();
$sHelper = new StructureHelper;
$lava = new Lavacharts; $lava = new Lavacharts;
$esiHelper = new Esi; $esiHelper = new Esi;
$config = config('esi'); $config = config('esi');
$sHelper = new StructureHelper($config['primary'], $config['corporation']);
//Check for the correct scopes //Check for the correct scopes
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1')) { if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1')) {
return redirect('/dashboard')->with('error', 'Tell the nub Minerva to register the correct scopes for the services site.'); return redirect('/dashboard')->with('error', 'Tell the nub Minerva to register the correct scopes for the services site.');
} }
$refreshToken = $esiHelper->GetRefreshToken($config['primar']);
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Get the esi data for extractions //Get the esi data for extractions
try { try {
$response = $esi->invoke('get', '/corporation/{corporation_id}/mining/extractions', [ $response = $esi->invoke('get', '/corporation/{corporation_id}/mining/extractions', [