Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1123608c

Přidáno uživatelem Cajova-Houba před asi 7 roky(ů)

#6638: Odebrany stare endpointy REST api, pridany nove podle navrhu z #6635.

Zobrazit rozdíly:

backend/app/Http/routes.php
11 11
|
12 12
*/
13 13

  
14
$app->get('/', function () use ($app) {
15
    return $app->version();
16
});
14
$apiUrlRoot='/api/v1/';
17 15

  
18
$app->get('/hello', function() {
19
    return "world!";
16
$app->get('/', function ()  {
17
    return 'Funguje to.';
20 18
});
21 19

  
22
$app->get('/location', 'LocationController@getLocation');
20
/**
21
 * Parametry v url:
22
 * address
23
 * showDirection
24
 */
25
$app->get($apiUrlRoot.'devices', 'DeviceController@getDevice');
26

  
27
/**
28
 * Parametry v url:
29
 * dateFrom
30
 * dateTo
31
 * timeFrom
32
 * timeTo
33
 * direction
34
 */
35
$app->get($apiUrlRoot.'devices/{id}', 'DeviceController@getDeviceById');
23 36

  
24
$app->get('/location/{id}', 'LocationController@findById');
37
/**
38
 * Vrati vsechny typy aut.
39
 */
40
$app->get($apiUrlRoot.'vehicles', 'VehicleController@getAll');

Také k dispozici: Unified diff