aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-04-01 10:02:03 +0200
committerGitHub <noreply@github.com>2017-04-01 10:02:03 +0200
commit4b385d6c344c4a0a0b424622833bc72974c21cb5 (patch)
tree213d0986e075596a4dd2082be22113e08cac8456 /index.php
parente96be632f5a7e8a8d39d99526ddd028084653b2f (diff)
parent68016e37983b882c51c6ac92da6f6cc1250676e5 (diff)
downloadShaarli-4b385d6c344c4a0a0b424622833bc72974c21cb5.tar.gz
Shaarli-4b385d6c344c4a0a0b424622833bc72974c21cb5.tar.zst
Shaarli-4b385d6c344c4a0a0b424622833bc72974c21cb5.zip
Merge pull request #742 from ArthurHoaro/api/postLink
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 ca998885..863d5093 100644
--- a/index.php
+++ b/index.php
@@ -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);