diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-06 17:32:16 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 15:58:49 +0200 |
commit | 0843848c1d18e92504c43d181063a2012f8fd5b9 (patch) | |
tree | faf798ea7d1e4a41edce202cebd0cd7d45e22300 /index.php | |
parent | cf9181dddf8b6113b1b017e4bcb21fac0a0b1c83 (diff) | |
download | Shaarli-0843848c1d18e92504c43d181063a2012f8fd5b9.tar.gz Shaarli-0843848c1d18e92504c43d181063a2012f8fd5b9.tar.zst Shaarli-0843848c1d18e92504c43d181063a2012f8fd5b9.zip |
API: add DELETE endpoint
Based on #840
See http://shaarli.github.io/api-documentation/\#links-link-delete
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2247,6 +2247,7 @@ $app->group('/api/v1', function() { | |||
2247 | $this->get('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink')->setName('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 | $this->post('/links', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink'); |
2249 | $this->put('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:putLink')->setName('putLink'); | 2249 | $this->put('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:putLink')->setName('putLink'); |
2250 | $this->delete('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:deleteLink')->setName('deleteLink'); | ||
2250 | })->add('\Shaarli\Api\ApiMiddleware'); | 2251 | })->add('\Shaarli\Api\ApiMiddleware'); |
2251 | 2252 | ||
2252 | $response = $app->run(true); | 2253 | $response = $app->run(true); |