1
0
Fork 0
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:
Jeremy Benoist 2017-05-09 23:15:25 +02:00
parent 0eb8220204
commit 1594a79fc5
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
2 changed files with 28 additions and 6 deletions

View file

@ -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 = [];