forked from wallabag/wallabag
Added new endpoint for API: config
This commit is contained in:
committed by
Jeremy Benoist
parent
88fd7afeb5
commit
bb12538fab
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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user