refactor(controller): usage of attributes instead of annotations
This commit is contained in:
parent
37b9beb8f7
commit
b03a7f7bad
8 changed files with 45 additions and 69 deletions
|
|
@ -29,6 +29,8 @@ use OCP\AppFramework\Http\Response;
|
|||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\IRequest;
|
||||
use OCP\IUserSession;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
||||
|
||||
class CssController extends Controller
|
||||
{
|
||||
|
|
@ -46,11 +48,10 @@ class CssController extends Controller
|
|||
$this->user = OC::$server[IUserSession::class]->getUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @PublicPage
|
||||
*/
|
||||
#[NoCSRFRequired]
|
||||
#[NoAdminRequired]
|
||||
#[PublicPage]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/css/stylesheet')]
|
||||
public function stylesheet(): TemplateResponse
|
||||
{
|
||||
$response = new TemplateResponse(Application::APP_ID, 'css/stylesheet', $this->getConfig(), 'blank');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue