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:
parent
88fd7afeb5
commit
bb12538fab
3 changed files with 77 additions and 0 deletions
23
src/Wallabag/ApiBundle/Controller/ConfigRestController.php
Normal file
23
src/Wallabag/ApiBundle/Controller/ConfigRestController.php
Normal 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());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue