diff --git a/appinfo/routes/routesBotController.php b/appinfo/routes/routesBotController.php index 22c2931f438..c008f8e8261 100644 --- a/appinfo/routes/routesBotController.php +++ b/appinfo/routes/routesBotController.php @@ -8,6 +8,10 @@ $requirements = [ 'apiVersion' => '(v1)', +]; + +$requirementsWithToken = [ + 'apiVersion' => '(v1)', 'token' => '[a-z0-9]{4,30}', ]; @@ -26,7 +30,7 @@ return [ 'ocs' => [ /** @see \OCA\Talk\Controller\BotController::sendMessage() */ - ['name' => 'Bot#sendMessage', 'url' => '/api/{apiVersion}/bot/{token}/message', 'verb' => 'POST', 'requirements' => $requirements], + ['name' => 'Bot#sendMessage', 'url' => '/api/{apiVersion}/bot/{token}/message', 'verb' => 'POST', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\BotController::react() */ ['name' => 'Bot#react', 'url' => '/api/{apiVersion}/bot/{token}/reaction/{messageId}', 'verb' => 'POST', 'requirements' => $requirementsWithMessageId], /** @see \OCA\Talk\Controller\BotController::deleteReaction() */ @@ -34,7 +38,7 @@ /** @see \OCA\Talk\Controller\BotController::adminListBots() */ ['name' => 'Bot#adminListBots', 'url' => '/api/{apiVersion}/bot/admin', 'verb' => 'GET', 'requirements' => $requirements], /** @see \OCA\Talk\Controller\BotController::listBots() */ - ['name' => 'Bot#listBots', 'url' => '/api/{apiVersion}/bot/{token}', 'verb' => 'GET', 'requirements' => $requirements], + ['name' => 'Bot#listBots', 'url' => '/api/{apiVersion}/bot/{token}', 'verb' => 'GET', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\BotController::enableBot() */ ['name' => 'Bot#enableBot', 'url' => '/api/{apiVersion}/bot/{token}/{botId}', 'verb' => 'POST', 'requirements' => $requirementsWithBotId], /** @see \OCA\Talk\Controller\BotController::disableBot() */ diff --git a/appinfo/routes/routesRecordingController.php b/appinfo/routes/routesRecordingController.php index 9cb2f47d9c5..7826d663ecc 100644 --- a/appinfo/routes/routesRecordingController.php +++ b/appinfo/routes/routesRecordingController.php @@ -8,6 +8,10 @@ $requirements = [ 'apiVersion' => '(v1)', +]; + +$requirementsWithToken = [ + 'apiVersion' => '(v1)', 'token' => '[a-z0-9]{4,30}', ]; @@ -20,14 +24,14 @@ /** @see \OCA\Talk\Controller\RecordingController::backend() */ ['name' => 'Recording#backend', 'url' => '/api/{apiVersion}/recording/backend', 'verb' => 'POST', 'requirements' => $requirements], /** @see \OCA\Talk\Controller\RecordingController::start() */ - ['name' => 'Recording#start', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'POST', 'requirements' => $requirements], + ['name' => 'Recording#start', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'POST', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\RecordingController::stop() */ - ['name' => 'Recording#stop', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'DELETE', 'requirements' => $requirements], + ['name' => 'Recording#stop', 'url' => '/api/{apiVersion}/recording/{token}', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\RecordingController::store() */ - ['name' => 'Recording#store', 'url' => '/api/{apiVersion}/recording/{token}/store', 'verb' => 'POST', 'requirements' => $requirements], + ['name' => 'Recording#store', 'url' => '/api/{apiVersion}/recording/{token}/store', 'verb' => 'POST', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\RecordingController::notificationDismiss() */ - ['name' => 'Recording#notificationDismiss', 'url' => '/api/{apiVersion}/recording/{token}/notification', 'verb' => 'DELETE', 'requirements' => $requirements], + ['name' => 'Recording#notificationDismiss', 'url' => '/api/{apiVersion}/recording/{token}/notification', 'verb' => 'DELETE', 'requirements' => $requirementsWithToken], /** @see \OCA\Talk\Controller\RecordingController::shareToChat() */ - ['name' => 'Recording#shareToChat', 'url' => '/api/{apiVersion}/recording/{token}/share-chat', 'verb' => 'POST', 'requirements' => $requirements], + ['name' => 'Recording#shareToChat', 'url' => '/api/{apiVersion}/recording/{token}/share-chat', 'verb' => 'POST', 'requirements' => $requirementsWithToken], ], ];