diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-09 23:15:25 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-09 23:15:25 +0200 |
commit | 1594a79fc5eefe217ed463144857d0693b6714fa (patch) | |
tree | 7570601ba62df6dd80fabb0d06a977fec63dc2eb /src | |
parent | 0eb8220204953b874ebd2dbd0362973f3f45074c (diff) | |
download | wallabag-1594a79fc5eefe217ed463144857d0693b6714fa.tar.gz wallabag-1594a79fc5eefe217ed463144857d0693b6714fa.tar.zst wallabag-1594a79fc5eefe217ed463144857d0693b6714fa.zip |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/TagRestController.php | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
44 | public function deleteTagLabelAction(Request $request) | 44 | public function deleteTagLabelAction(Request $request) |
45 | { | 45 | { |
46 | $this->validateAuthentication(); | 46 | $this->validateAuthentication(); |
47 | $label = $request->request->get('tag', ''); | 47 | $label = $request->get('tag', ''); |
48 | 48 | ||
49 | $tag = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneByLabel($label); | 49 | $tag = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneByLabel($label); |
50 | 50 | ||
@@ -78,7 +78,7 @@ class TagRestController extends WallabagRestController | |||
78 | { | 78 | { |
79 | $this->validateAuthentication(); | 79 | $this->validateAuthentication(); |
80 | 80 | ||
81 | $tagsLabels = $request->request->get('tags', ''); | 81 | $tagsLabels = $request->get('tags', ''); |
82 | 82 | ||
83 | $tags = []; | 83 | $tags = []; |
84 | 84 | ||