aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-01-05 15:58:24 +0100
committerArthurHoaro <arthur@hoa.ro>2017-03-27 18:44:50 +0200
commit68016e37983b882c51c6ac92da6f6cc1250676e5 (patch)
tree9f4f2cef8c8908f2f551f0678e4b6686de6dd5cc /index.php
parentb320c860f5c794c57c08ee2a65c9b73768aac23c (diff)
downloadShaarli-68016e37983b882c51c6ac92da6f6cc1250676e5.tar.gz
Shaarli-68016e37983b882c51c6ac92da6f6cc1250676e5.tar.zst
Shaarli-68016e37983b882c51c6ac92da6f6cc1250676e5.zip
REST API: implement POST link service
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);