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-03 00:53:25 +08:00
|
|
|
Route::get('airports/{id}', 'AirportController@get');
|
|
|
|
Route::get('airports/{id}/lookup', 'AirportController@lookup');
|
|
|
|
|
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
|
|
|
|
2017-12-29 04:35:28 +08:00
|
|
|
Route::get('pireps/{id}/acars', 'PirepController@acars_get');
|
|
|
|
Route::get('pireps/{id}/geojson', 'PirepController@acars_get');
|
2017-12-28 06:47:22 +08:00
|
|
|
|
2017-12-29 08:00:35 +08:00
|
|
|
Route::get('status', '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::get('pireps/{id}', 'PirepController@get');
|
|
|
|
Route::post('pireps/prefile', 'PirepController@prefile');
|
|
|
|
Route::post('pireps/{id}/file', 'PirepController@file');
|
2017-12-26 05:19:34 +08:00
|
|
|
|
2017-12-29 04:35:28 +08:00
|
|
|
Route::post('pireps/{id}/acars', 'PirepController@acars_store');
|
2017-12-26 05:19:34 +08:00
|
|
|
|
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
|
|
|
});
|