mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add instance config endpoint
This commit is contained in:
20
src/Controller/InstanceController.php
Normal file
20
src/Controller/InstanceController.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Entity\Instance;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
||||
class InstanceController extends AbstractController
|
||||
{
|
||||
public function __invoke(): Instance
|
||||
{
|
||||
$instance = new Instance();
|
||||
|
||||
$instance
|
||||
->setLimitedFeatures($this->getParameter('limited_features') ?? false)
|
||||
->setOauthEnabled($this->getParameter('oauth_enabled'));
|
||||
|
||||
return $instance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user