* Refactor all JS API calls #360 * Remove unused imports * Lint JS * Fix doubled api key * Formatting * Added extra logging to distance lookup * Remove the .editorconfig file in distrib * shell check fixes * Remove the .editorconfig file in distrib
This commit is contained in:
@@ -181,6 +181,7 @@ class PirepController extends Controller
|
||||
Log::info('aircraft', $aircraft->toArray());
|
||||
|
||||
return view('admin.pireps.fares', [
|
||||
'pirep' => null,
|
||||
'aircraft' => $aircraft,
|
||||
'read_only' => false,
|
||||
]);
|
||||
|
||||
@@ -73,8 +73,8 @@ class AcarsController extends Controller
|
||||
$pireps = $this->acarsRepo->getPositions(setting('acars.live_time'));
|
||||
$positions = $this->geoSvc->getFeatureForLiveFlights($pireps);
|
||||
|
||||
return response(json_encode($positions), 200, [
|
||||
'Content-type' => 'application/json',
|
||||
return response()->json([
|
||||
'data' => $positions,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -84,15 +84,15 @@ class AcarsController extends Controller
|
||||
* @param $pirep_id
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Contracts\Routing\ResponseFactory
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function acars_geojson($pirep_id, Request $request)
|
||||
{
|
||||
$pirep = Pirep::find($pirep_id);
|
||||
$geodata = $this->geoSvc->getFeatureFromAcars($pirep);
|
||||
|
||||
return response(\json_encode($geodata), 200, [
|
||||
'Content-Type' => 'application/json',
|
||||
return response()->json([
|
||||
'data' => $geodata,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -505,6 +505,7 @@ class PirepController extends Controller
|
||||
public function route_get($id, Request $request)
|
||||
{
|
||||
$pirep = Pirep::find($id);
|
||||
|
||||
return AcarsRouteResource::collection(Acars::where([
|
||||
'pirep_id' => $id,
|
||||
'type' => AcarsType::ROUTE,
|
||||
|
||||
Reference in New Issue
Block a user