diff options
author | Joas Schilling <coding@schilljs.com> | 2022-05-03 23:11:47 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-06-13 13:52:56 +0300 |
commit | bce64c3fbf65fc2032e6a59748329035ab707518 (patch) | |
tree | 4457542e6eba2c1d6f004a634afe9359f4eb3e4c /appinfo | |
parent | 84a30c9ba8e511cd71f6184c4a13637e9e648dd8 (diff) |
Add model, migration and base
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/routes.php | 1 | ||||
-rw-r--r-- | appinfo/routes/routesPollController.php | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index fde29617e..6fba9ee5a 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -35,6 +35,7 @@ return array_merge_recursive( include(__DIR__ . '/routes/routesMatterbridgeController.php'), include(__DIR__ . '/routes/routesMatterbridgeSettingsController.php'), include(__DIR__ . '/routes/routesPageController.php'), + include(__DIR__ . '/routes/routesPollController.php'), include(__DIR__ . '/routes/routesPublicShareAuthController.php'), include(__DIR__ . '/routes/routesReactionController.php'), include(__DIR__ . '/routes/routesRoomController.php'), diff --git a/appinfo/routes/routesPollController.php b/appinfo/routes/routesPollController.php new file mode 100644 index 000000000..1e5145e60 --- /dev/null +++ b/appinfo/routes/routesPollController.php @@ -0,0 +1,42 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> + * + * @author Lukas Reschke <lukas@statuscode.ch> + * + * @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}$', +]; + +$requirementsWithPollId = [ + 'apiVersion' => 'v1', + 'token' => '^[a-z0-9]{4,30}$', + 'pollId' => '^[0-9]+$', +]; + +return [ + 'ocs' => [ + /** @see \OCA\Talk\Controller\PollController::createPoll() */ + ['name' => 'Poll#createPoll', 'url' => '/api/{apiVersion}/poll/{token}', 'verb' => 'POST', 'requirements' => $requirements], + ], +]; |