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-29 01:12:13 +08:00
|
|
|
Route::get('pireps/{pirep_id}', 'PirepController@get');
|
|
|
|
Route::get('pireps/{pirep_id}/route', 'PirepController@route_get');
|
2018-01-31 01:36:22 +08:00
|
|
|
Route::get('pireps/{pirep_id}/comments', 'PirepController@comments_get');
|
2018-01-29 01:12:13 +08:00
|
|
|
Route::get('pireps/{pirep_id}/acars/position', 'PirepController@acars_get');
|
|
|
|
Route::get('pireps/{pirep_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');
|
2018-01-31 01:36:22 +08:00
|
|
|
Route::post('pireps/{pirep_id}/update', 'PirepController@update');
|
2018-01-29 01:12:13 +08:00
|
|
|
Route::post('pireps/{pirep_id}/file', 'PirepController@file');
|
2018-01-31 01:36:22 +08:00
|
|
|
Route::post('pireps/{pirep_id}/comments', 'PirepController@comments_post');
|
2018-01-29 01:12:13 +08:00
|
|
|
Route::delete('pireps/{pirep_id}/cancel', 'PirepController@cancel');
|
2018-01-05 09:33:23 +08:00
|
|
|
|
2018-01-31 01:36:22 +08:00
|
|
|
Route::post('pireps/{pirep_id}/route', 'PirepController@route_post');
|
|
|
|
Route::delete('pireps/{pirep_id}/route', 'PirepController@route_delete');
|
|
|
|
|
2018-01-29 01:12:13 +08:00
|
|
|
Route::post('pireps/{pirep_id}/acars/position', 'PirepController@acars_store');
|
|
|
|
Route::post('pireps/{pirep_id}/acars/positions', 'PirepController@acars_store');
|
2018-01-05 10:08:22 +08:00
|
|
|
|
2018-01-29 02:02:41 +08:00
|
|
|
Route::post('pireps/{pirep_id}/acars/event', 'PirepController@acars_log');
|
2018-01-29 01:12:13 +08:00
|
|
|
Route::post('pireps/{pirep_id}/acars/log', 'PirepController@acars_log');
|
|
|
|
Route::post('pireps/{pirep_id}/acars/logs', 'PirepController@acars_log');
|
2017-12-26 05:19:34 +08:00
|
|
|
|
2018-01-07 05:41:23 +08:00
|
|
|
Route::get('settings', 'SettingsController@index');
|
|
|
|
|
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');
|
2018-01-11 08:40:01 +08:00
|
|
|
Route::get('user/fleet', 'UserController@fleet');
|
2018-01-07 05:41:23 +08:00
|
|
|
|
2017-12-29 04:35:28 +08:00
|
|
|
Route::get('users/{id}', 'UserController@get');
|
|
|
|
Route::get('users/{id}/bids', 'UserController@bids');
|
2018-01-11 08:40:01 +08:00
|
|
|
Route::get('users/{id}/fleet', 'UserController@fleet');
|
2017-08-15 07:26:20 +08:00
|
|
|
});
|