diff options
author | Vitor Mattos <vitor@php.rio> | 2022-12-12 14:26:59 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2022-12-12 14:26:59 -0300 |
commit | b06786de2583d81a4abe5177ff4a44a27fdce155 (patch) | |
tree | b596960fac12e3f28b9ec82f6a3d7540db687b79 /appinfo | |
parent | 0f179b79d5817cc93b1f8e3653c5010cc7f5ea46 (diff) |
Moved methods of recording api to specific controller
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/routes/routesRecordingController.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/appinfo/routes/routesRecordingController.php b/appinfo/routes/routesRecordingController.php new file mode 100644 index 000000000..88d4c576f --- /dev/null +++ b/appinfo/routes/routesRecordingController.php @@ -0,0 +1,38 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2022 Vitor Mattos <vitor@php.rio> + * + * @author Vitor Mattos <vitor@php.rio> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +$requirements = [ + 'apiVersion' => 'v1', + 'token' => '[a-z0-9]{4,30}', +]; + +return [ + 'ocs' => [ + /** @see \OCA\Talk\Controller\RecordingController::startRecording() */ + ['name' => 'Recording#startRecording', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'POST', 'requirements' => $requirements], + /** @see \OCA\Talk\Controller\RecordingController::stopRecording() */ + ['name' => 'Recording#stopRecording', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'DELETE', 'requirements' => $requirements], + ], +]; |