mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
Retrieve tag / tags value from query or request
It allows to request to delete a tag using query string instead of body parameter (which seems to be the standard). Instead of breaking the previous behavior, I used a generic way to retrieve parameter (which looks into request attributes, query parameters and request parameters)
This commit is contained in:
parent
0eb8220204
commit
1594a79fc5
2 changed files with 28 additions and 6 deletions
|
@ -44,7 +44,7 @@ class TagRestController extends WallabagRestController
|
|||
public function deleteTagLabelAction(Request $request)
|
||||
{
|
||||
$this->validateAuthentication();
|
||||
$label = $request->request->get('tag', '');
|
||||
$label = $request->get('tag', '');
|
||||
|
||||
$tag = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneByLabel($label);
|
||||
|
||||
|
@ -78,7 +78,7 @@ class TagRestController extends WallabagRestController
|
|||
{
|
||||
$this->validateAuthentication();
|
||||
|
||||
$tagsLabels = $request->request->get('tags', '');
|
||||
$tagsLabels = $request->get('tags', '');
|
||||
|
||||
$tags = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue