diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2242,9 +2242,10 @@ $app = new \Slim\App($container); | |||
2242 | 2242 | ||
2243 | // REST API routes | 2243 | // REST API routes |
2244 | $app->group('/api/v1', function() { | 2244 | $app->group('/api/v1', function() { |
2245 | $this->get('/info', '\Shaarli\Api\Controllers\Info:getInfo'); | 2245 | $this->get('/info', '\Shaarli\Api\Controllers\Info:getInfo')->setName('getInfo'); |
2246 | $this->get('/links', '\Shaarli\Api\Controllers\Links:getLinks'); | 2246 | $this->get('/links', '\Shaarli\Api\Controllers\Links:getLinks')->setName('getLinks'); |
2247 | $this->get('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink'); | 2247 | $this->get('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink')->setName('getLink'); |
2248 | $this->post('/links', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink'); | ||
2248 | })->add('\Shaarli\Api\ApiMiddleware'); | 2249 | })->add('\Shaarli\Api\ApiMiddleware'); |
2249 | 2250 | ||
2250 | $response = $app->run(true); | 2251 | $response = $app->run(true); |