2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
2017-12-28 06:47:22 +08:00
|
|
|
/**
|
|
|
|
* public routes
|
|
|
|
*/
|
|
|
|
Route::group([], function()
|
2017-12-13 06:58:27 +08:00
|
|
|
{
|
2017-12-29 04:35:28 +08:00
|
|
|
Route::get('acars', 'AcarsController@index');
|
2017-12-28 06:47:22 +08:00
|
|
|
|
2018-01-07 05:13:33 +08:00
|
|
|
Route::get('airlines', 'AirlineController@index');
|
|
|
|
Route::get('airlines/{id}', 'AirlineController@get');
|
|
|
|
|
2018-01-06 00:23:26 +08:00
|
|
|
Route::get('airports', 'AirportController@index');
|
2018-01-06 05:30:35 +08:00
|
|
|
Route::get('airports/hubs', 'AirportController@index_hubs');
|
2018-01-03 00:53:25 +08:00
|
|
|
Route::get('airports/{id}', 'AirportController@get');
|
|
|
|
Route::get('airports/{id}/lookup', 'AirportController@lookup');
|
|
|
|
|
2018-01-06 00:45:34 +08:00
|
|
|
Route::get('fleet', 'FleetController@index');
|
2018-01-06 03:00:45 +08:00
|
|
|
Route::get('fleet/aircraft/{id}', 'FleetController@get_aircraft');
|
2018-01-06 00:45:34 +08:00
|
|
|
|
2018-01-07 05:21:21 +08:00
|
|
|
Route::get('flights', 'FlightController@index');
|
2017-12-29 04:35:28 +08:00
|
|
|
Route::get('flights/search', 'FlightController@search');
|
|
|
|
Route::get('flights/{id}', 'FlightController@get');
|
2017-12-28 06:47:22 +08:00
|
|
|
|
2018-01-07 05:13:33 +08:00
|
|
|
Route::get('pireps/{id}', 'PirepController@get');
|
2018-01-06 00:45:34 +08:00
|
|
|
Route::get('pireps/{id}/route', 'PirepController@route_get');
|
2018-01-06 03:13:56 +08:00
|
|
|
Route::get('pireps/{id}/acars/position', 'PirepController@acars_get');
|
2018-01-06 00:45:34 +08:00
|
|
|
Route::get('pireps/{id}/acars/geojson', 'PirepController@acars_geojson');
|
2017-12-28 06:47:22 +08:00
|
|
|
|
2017-12-29 08:00:35 +08:00
|
|
|
Route::get('status', 'StatusController@status');
|
2018-01-07 05:13:33 +08:00
|
|
|
Route::get('version', 'StatusController@status');
|
2017-12-28 06:47:22 +08:00
|
|
|
});
|
2017-08-15 12:36:49 +08:00
|
|
|
|
2017-12-28 06:47:22 +08:00
|
|
|
/**
|
|
|
|
* these need to be authenticated with a user's API key
|
|
|
|
*/
|
|
|
|
Route::group(['middleware' => ['api.auth']], function ()
|
|
|
|
{
|
2017-12-29 04:35:28 +08:00
|
|
|
Route::post('pireps/prefile', 'PirepController@prefile');
|
|
|
|
Route::post('pireps/{id}/file', 'PirepController@file');
|
2018-01-05 10:08:22 +08:00
|
|
|
Route::delete('pireps/{id}/cancel', 'PirepController@cancel');
|
2018-01-05 09:33:23 +08:00
|
|
|
|
2018-01-04 12:16:18 +08:00
|
|
|
Route::post('pireps/{id}/acars/position', 'PirepController@acars_store');
|
2018-01-05 10:08:22 +08:00
|
|
|
Route::post('pireps/{id}/acars/positions', 'PirepController@acars_store');
|
|
|
|
|
2018-01-04 12:16:18 +08:00
|
|
|
Route::post('pireps/{id}/acars/log', 'PirepController@acars_log');
|
2018-01-05 10:08:22 +08:00
|
|
|
Route::post('pireps/{id}/acars/logs', 'PirepController@acars_log');
|
2017-12-26 05:19:34 +08:00
|
|
|
|
2018-01-05 09:33:23 +08:00
|
|
|
Route::post('pireps/{id}/route', 'PirepController@route_post');
|
|
|
|
Route::delete('pireps/{id}/route', 'PirepController@route_delete');
|
|
|
|
|
2017-12-13 06:58:27 +08:00
|
|
|
# This is the info of the user whose token is in use
|
2017-12-29 04:35:28 +08:00
|
|
|
Route::get('user', 'UserController@index');
|
|
|
|
Route::get('users/{id}', 'UserController@get');
|
|
|
|
Route::get('users/{id}/bids', 'UserController@bids');
|
2017-08-15 07:26:20 +08:00
|
|
|
});
|