diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-04-01 10:02:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-01 10:02:03 +0200 |
commit | 4b385d6c344c4a0a0b424622833bc72974c21cb5 (patch) | |
tree | 213d0986e075596a4dd2082be22113e08cac8456 /index.php | |
parent | e96be632f5a7e8a8d39d99526ddd028084653b2f (diff) | |
parent | 68016e37983b882c51c6ac92da6f6cc1250676e5 (diff) | |
download | Shaarli-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.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); |