mining tax testing

This commit is contained in:
2021-03-07 20:43:40 +09:00
parent 75bfc0daf2
commit 0b15850c15

View File

@@ -149,7 +149,7 @@ class MiningTaxesController extends Controller
//Get the esi data for extractions //Get the esi data for extractions
try { try {
$response = $esi->invoke('get', '/corporation/{corporation_id}/mining/extractions', [ $extractions = $esi->invoke('get', '/corporation/{corporation_id}/mining/extractions', [
'corporation_id' => $config['corporation'], 'corporation_id' => $config['corporation'],
]); ]);
} catch(RequestFailedException $e) { } catch(RequestFailedException $e) {
@@ -157,9 +157,6 @@ class MiningTaxesController extends Controller
return redirect('/dashboard')->with('error', 'Failed to get extraction data from ESI'); return redirect('/dashboard')->with('error', 'Failed to get extraction data from ESI');
} }
//Decode the extraction data from ESI
$extractions = json_decode($response, false);
/** /**
* Create a 3 month calendar for the past, current, and future extractions * Create a 3 month calendar for the past, current, and future extractions
*/ */
@@ -172,7 +169,7 @@ class MiningTaxesController extends Controller
foreach($extractions as $extract) { foreach($extractions as $extract) {
$calendar->addRow([ $calendar->addRow([
$extract->chunk_arrival_time, $esiHelper->DecodeDate($extract->chunk_arrival_time),
1 1
]); ]);
} }