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:
parent
1e5a4b36ab
commit
2b4770301c
2 changed files with 14 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue