Revize a800985e
Přidáno uživatelem Cajova-Houba před téměř 7 roky(ů)
backend/app/Http/routes.php | ||
---|---|---|
25 | 25 |
* address |
26 | 26 |
* showDirection |
27 | 27 |
*/ |
28 |
$app->get($apiUrlRoot.'devices', 'DeviceController@getDevice'); |
|
28 |
$app->get($apiUrlRoot.'devices', [ |
|
29 |
'middleware' => 'jwtauth', |
|
30 |
'uses' => 'DeviceController@getDevice' |
|
31 |
]); |
|
29 | 32 |
|
30 |
//$app->get($apiUrlRoot.'devices/all', 'DeviceController@getAll'); |
|
31 | 33 |
|
32 | 34 |
/** |
33 | 35 |
* Parametry v url: |
... | ... | |
37 | 39 |
* timeTo |
38 | 40 |
* direction |
39 | 41 |
*/ |
40 |
$app->get($apiUrlRoot.'devices/{id}', 'DeviceController@getDeviceById'); |
|
42 |
$app->get($apiUrlRoot.'devices/{id}', [ |
|
43 |
'middleware' => 'jwtauth', |
|
44 |
'uses' => 'DeviceController@getDeviceById' |
|
45 |
]); |
|
46 |
|
|
41 | 47 |
|
42 | 48 |
/** |
43 | 49 |
* Vrati vsechny typy aut. |
44 | 50 |
*/ |
45 |
$app->get($apiUrlRoot.'vehicles', 'VehicleController@getAll'); |
|
51 |
$app->get($apiUrlRoot.'vehicles', [ |
|
52 |
'middleware' => 'jwtauth', |
|
53 |
'uses' => 'VehicleController@getAll' |
|
54 |
]); |
|
46 | 55 |
|
47 | 56 |
/** |
48 | 57 |
* Vrati vsechna mesta. |
49 | 58 |
*/ |
50 |
$app->get($apiUrlRoot.'cities', 'LocationController@getCities'); |
|
59 |
$app->get($apiUrlRoot.'cities', [ |
|
60 |
'middleware' => 'jwtauth', |
|
61 |
'uses' => 'LocationController@getCities' |
|
62 |
]); |
|
51 | 63 |
|
52 | 64 |
/** |
53 | 65 |
* Vygeneruje novy JWT s omezenou platnosti. |
Také k dispozici: Unified diff
refs #6742: Pridan middleware pro kontrolu JWT.