PageController.php 732 B

123456789101112131415161718192021222324252627
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\TestApp\Controller;
  8. use OCA\TestApp\AppInfo\Application;
  9. use OCP\AppFramework\Controller;
  10. use OCP\AppFramework\Http\Attribute\NoAdminRequired;
  11. use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
  12. use OCP\AppFramework\Http\TemplateResponse;
  13. use OCP\IRequest;
  14. class PageController extends Controller {
  15. public function __construct(IRequest $request) {
  16. parent::__construct(Application::APP_ID, $request);
  17. }
  18. #[NoAdminRequired]
  19. #[NoCSRFRequired]
  20. public function index(): TemplateResponse {
  21. return new TemplateResponse(Application::APP_ID, 'main');
  22. }
  23. }