diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index cb68784d..2384325f 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php | |||
@@ -232,38 +232,14 @@ class WallabagRestController extends Controller | |||
232 | * Retrieve all tags | 232 | * Retrieve all tags |
233 | * | 233 | * |
234 | * @ApiDoc( | 234 | * @ApiDoc( |
235 | * {"name"="user", "dataType"="integer", "requirement"="\w+", "description"="The user ID"} | ||
235 | * ) | 236 | * ) |
236 | */ | 237 | */ |
237 | public function getTagsAction() | 238 | public function getTagsUserAction() |
238 | { | 239 | { |
239 | } | 240 | } |
240 | 241 | ||
241 | /** | 242 | /** |
242 | * Retrieve a single tag | ||
243 | * | ||
244 | * @ApiDoc( | ||
245 | * requirements={ | ||
246 | * {"name"="label", "dataType"="string", "requirement"="\w+", "description"="Label of the tag"} | ||
247 | * } | ||
248 | * ) | ||
249 | */ | ||
250 | public function getTagAction($label) | ||
251 | { | ||
252 | $tag = $this | ||
253 | ->getDoctrine() | ||
254 | ->getRepository('WallabagCoreBundle:Tag') | ||
255 | ->findOneByLabel($label); | ||
256 | |||
257 | if (is_null($tag)) { | ||
258 | throw $this->createNotFoundException(); | ||
259 | } | ||
260 | |||
261 | $json = $this->get('serializer')->serialize($tag, 'json'); | ||
262 | |||
263 | return new Response($json, 200, array('application/json')); | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * Permanently remove one tag from **every** entry | 243 | * Permanently remove one tag from **every** entry |
268 | * | 244 | * |
269 | * @ApiDoc( | 245 | * @ApiDoc( |