nextcloud-pride-flags/lib/Controller/PageController.php
2024-07-29 20:45:34 +02:00

24 lines
598 B
PHP

<?php
declare(strict_types=1);
namespace OCA\PrideFlags\Controller;
use OCA\PrideFlags\Settings\AppSettings;
use OCP\IRequest;
use OCP\IConfig;
//use OCP\Framework\Controller;
use OCP\Framework\Http\Response;
class SettingsController {
public function __construct($appName, IRequest $request, AppSettings $settings) {
parent::__construct($appName, $request);
}
public function get(): JSONResponse {
return $this->settings->getAll();
}
public function set(string $folderVariant, string $buttonVariant): JSONResponse {
return $this->settings->set($folderVariant, $buttonVariant);
}
}