nextcloud-pride-flags/lib/Controller/PageController.php

24 lines
598 B
PHP
Raw Normal View History

2024-07-28 17:57:30 +02:00
<?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);
}
}