From 1594a79fc5eefe217ed463144857d0693b6714fa Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 9 May 2017 23:15:25 +0200 Subject: 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) --- src/Wallabag/ApiBundle/Controller/TagRestController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/ApiBundle/Controller/TagRestController.php') diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php index 47298d7e..354187a0 100644 --- a/src/Wallabag/ApiBundle/Controller/TagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php @@ -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 = []; -- cgit v1.2.3