X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FWallabagRestController.php;fp=src%2FWallabag%2FApiBundle%2FController%2FWallabagRestController.php;h=544c1ea936718413658758b5d2507d71c3566a18;hb=5a619812ca3eb05a82a023ccdaee13501eb8d45f;hp=e927a8903a26af16f796fa8016e6dad7322d5b5a;hpb=84795d015b3c7e1af48a3dda3cb33cf080b66e8f;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index e927a890..544c1ea9 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -8,6 +8,20 @@ use Wallabag\CoreBundle\Entity\Entry; class WallabagRestController extends FOSRestController { + /** + * Retrieve version number. + * + * @ApiDoc() + * + * @return JsonResponse + */ + public function getVersionAction() + { + $version = $this->container->getParameter('wallabag_core.version'); + $json = $this->get('serializer')->serialize($version, 'json'); + return (new JsonResponse())->setJson($json); + } + protected function validateAuthentication() { if (false === $this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) {