aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-03-08 10:09:57 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-03-08 10:09:57 +0100
commitd442cf4a92118a96926865447560b89e129d73dd (patch)
tree1c820015be10850fd48897ca663e1a5804b94bdd /src/Wallabag/ApiBundle/Controller
parent807037884f0085cd39fe4b41cacd82be14e309d9 (diff)
parent6f8310b445ce0aeb40aeed78501a6e113c05c087 (diff)
downloadwallabag-d442cf4a92118a96926865447560b89e129d73dd.tar.gz
wallabag-d442cf4a92118a96926865447560b89e129d73dd.tar.zst
wallabag-d442cf4a92118a96926865447560b89e129d73dd.zip
Merge pull request #1761 from wallabag/v2-API-version
V2 api version
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 35a90edd..29cab1f4 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -340,6 +340,21 @@ class WallabagRestController extends FOSRestController
340 340
341 return $this->renderJsonResponse($json); 341 return $this->renderJsonResponse($json);
342 } 342 }
343 /**
344 * Retrieve version number.
345 *
346 * @ApiDoc()
347 *
348 * @return Response
349 */
350 public function getVersionAction()
351 {
352 $version = $this->container->getParameter('wallabag_core.version');
353
354 $json = $this->get('serializer')->serialize($version, 'json');
355
356 return $this->renderJsonResponse($json);
357 }
343 358
344 /** 359 /**
345 * Validate that the first id is equal to the second one. 360 * Validate that the first id is equal to the second one.