aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/index.php b/index.php
index 5c21c2f6..021fc6e9 100644
--- a/index.php
+++ b/index.php
@@ -2240,9 +2240,10 @@ $app = new \Slim\App($container);
2240 2240
2241// REST API routes 2241// REST API routes
2242$app->group('/api/v1', function() { 2242$app->group('/api/v1', function() {
2243 $this->get('/info', '\Shaarli\Api\Controllers\Info:getInfo'); 2243 $this->get('/info', '\Shaarli\Api\Controllers\Info:getInfo')->setName('getInfo');
2244 $this->get('/links', '\Shaarli\Api\Controllers\Links:getLinks'); 2244 $this->get('/links', '\Shaarli\Api\Controllers\Links:getLinks')->setName('getLinks');
2245 $this->get('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink'); 2245 $this->get('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink')->setName('getLink');
2246 $this->post('/links', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink');
2246})->add('\Shaarli\Api\ApiMiddleware'); 2247})->add('\Shaarli\Api\ApiMiddleware');
2247 2248
2248$response = $app->run(true); 2249$response = $app->run(true);