Rollback breaking change in REST API routes (#1410)

Rollback breaking change in REST API routes
This commit is contained in:
ArthurHoaro 2020-01-26 11:33:22 +01:00 committed by GitHub
commit 1410dce2db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1939,11 +1939,11 @@ function install($conf, $sessionManager, $loginManager)
// REST API routes // REST API routes
$app->group('/api/v1', function () { $app->group('/api/v1', function () {
$this->get('/info', '\Shaarli\Api\Controllers\Info:getInfo')->setName('getInfo'); $this->get('/info', '\Shaarli\Api\Controllers\Info:getInfo')->setName('getInfo');
$this->get('/bookmarks', '\Shaarli\Api\Controllers\Links:getLinks')->setName('getLinks'); $this->get('/links', '\Shaarli\Api\Controllers\Links:getLinks')->setName('getLinks');
$this->get('/bookmarks/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink')->setName('getLink'); $this->get('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink')->setName('getLink');
$this->post('/bookmarks', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink'); $this->post('/links', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink');
$this->put('/bookmarks/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:putLink')->setName('putLink'); $this->put('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:putLink')->setName('putLink');
$this->delete('/bookmarks/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:deleteLink')->setName('deleteLink'); $this->delete('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:deleteLink')->setName('deleteLink');
$this->get('/tags', '\Shaarli\Api\Controllers\Tags:getTags')->setName('getTags'); $this->get('/tags', '\Shaarli\Api\Controllers\Tags:getTags')->setName('getTags');
$this->get('/tags/{tagName:[\w]+}', '\Shaarli\Api\Controllers\Tags:getTag')->setName('getTag'); $this->get('/tags/{tagName:[\w]+}', '\Shaarli\Api\Controllers\Tags:getTag')->setName('getTag');