diff options
author | Joas Schilling <coding@schilljs.com> | 2023-04-25 15:37:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-04-26 09:15:49 +0200 |
commit | 5ac5d00e2d64f580aadc3257d166c1df4c904313 (patch) | |
tree | 17c2d32d1ab87501fed7c356dcd82c02d21fec83 /lib/Controller/RecordingController.php | |
parent | a699d959ec4c6749172ee70d419f0ed90efc80f5 (diff) |
feat(controllers): Migrate server annotations to attributes
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/RecordingController.php')
-rw-r--r-- | lib/Controller/RecordingController.php | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php index 612410204..f881ede04 100644 --- a/lib/Controller/RecordingController.php +++ b/lib/Controller/RecordingController.php @@ -40,6 +40,8 @@ use OCA\Talk\Service\RecordingService; use OCA\Talk\Service\RoomService; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\BruteForceProtection; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\Http\Client\IClientService; use OCP\IRequest; @@ -135,10 +137,9 @@ class RecordingController extends AEnvironmentAwareController { /** * Backend API to update recording status by backends. * - * @PublicPage - * * @return DataResponse */ + #[PublicPage] #[BruteForceProtection(action: 'talkRecordingSecret')] public function backend(): DataResponse { $json = $this->getInputStream(); @@ -267,9 +268,7 @@ class RecordingController extends AEnvironmentAwareController { return new DataResponse(); } - /** - * @NoAdminRequired - */ + #[NoAdminRequired] #[RequireLoggedInModeratorParticipant] public function start(int $status): DataResponse { try { @@ -280,9 +279,7 @@ class RecordingController extends AEnvironmentAwareController { return new DataResponse(); } - /** - * @NoAdminRequired - */ + #[NoAdminRequired] #[RequireLoggedInModeratorParticipant] public function stop(): DataResponse { try { @@ -293,9 +290,7 @@ class RecordingController extends AEnvironmentAwareController { return new DataResponse(); } - /** - * @PublicPage - */ + #[PublicPage] #[BruteForceProtection(action: 'talkRecordingSecret')] #[RequireRoom] public function store(string $owner): DataResponse { @@ -321,9 +316,7 @@ class RecordingController extends AEnvironmentAwareController { return new DataResponse(); } - /** - * @NoAdminRequired - */ + #[NoAdminRequired] #[RequireModeratorParticipant] public function notificationDismiss(int $timestamp): DataResponse { try { @@ -338,9 +331,7 @@ class RecordingController extends AEnvironmentAwareController { return new DataResponse(); } - /** - * @NoAdminRequired - */ + #[NoAdminRequired] #[RequireModeratorParticipant] public function shareToChat(int $fileId, int $timestamp): DataResponse { try { |