1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-17 17:08:37 +00:00

Add version in API

This commit is contained in:
Vincent 2016-03-07 15:00:03 +01:00
parent 1e5a4b36ab
commit 2b4770301c
2 changed files with 14 additions and 0 deletions

View file

@ -340,6 +340,19 @@ class WallabagRestController extends FOSRestController
return $this->renderJsonResponse($json);
}
/**
* Retrive version.
*
* @return Response
*/
public function getVersionAction()
{
$version = $this->container->getParameter('wallabag_core.version');
$json = $this->get('serializer')->serialize($version, 'json');
return $this->renderJsonResponse($json);
}
/**
* Validate that the first id is equal to the second one.