1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Added new endpoint for API: config

This commit is contained in:
Nicolas Lœuillet 2022-03-15 10:18:28 +01:00 committed by Jeremy Benoist
parent 88fd7afeb5
commit bb12538fab
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
3 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<?php
namespace Wallabag\ApiBundle\Controller;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Symfony\Component\HttpFoundation\JsonResponse;
class ConfigRestController extends WallabagRestController
{
/**
* Retrieve configuration for current user.
*
* @ApiDoc()
*
* @return JsonResponse
*/
public function getConfigAction()
{
$this->validateAuthentication();
return $this->sendResponse($this->getUser()->getConfig());
}
}