diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-11-02 11:25:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 11:25:58 +0100 |
commit | 8ee765a61743db31749b0bdb51ce09915458325f (patch) | |
tree | 312df5786a7d9a55fc5745052869a131f96d4ec6 | |
parent | 52a1760d4e4fd07551c607f9ae90f3f248d4c67b (diff) | |
parent | a4ba4544de9ab575a95d0a5f887787a6212b34c6 (diff) | |
download | nextcloud-server-8ee765a61743db31749b0bdb51ce09915458325f.tar.gz nextcloud-server-8ee765a61743db31749b0bdb51ce09915458325f.zip |
Merge pull request #7041 from nextcloud/fix_6967
Add 204 endpoint
-rw-r--r-- | core/Controller/WalledGardenController.php | 42 | ||||
-rw-r--r-- | core/routes.php | 3 | ||||
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 1 |
4 files changed, 46 insertions, 1 deletions
diff --git a/core/Controller/WalledGardenController.php b/core/Controller/WalledGardenController.php new file mode 100644 index 00000000000..737f5396779 --- /dev/null +++ b/core/Controller/WalledGardenController.php @@ -0,0 +1,42 @@ +<?php +/** + * @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl> + * + * @author Roeland Jago Douma <roeland@famdouma.nl> + * + * @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/>. + * + */ +namespace OC\Core\Controller; + +use OCP\AppFramework\Controller; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Response; + +class WalledGardenController extends Controller { + + /** + * @PublicPage + * @NoCSRFRequired + * + * @return Response + */ + function get() { + $resp = new Response(); + $resp->setStatus(Http::STATUS_NO_CONTENT); + return $resp; + } +} diff --git a/core/routes.php b/core/routes.php index 75d8fb140a7..bca62098b94 100644 --- a/core/routes.php +++ b/core/routes.php @@ -62,7 +62,8 @@ $application->registerRoutes($this, [ ['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'], ['name' => 'contactsMenu#index', 'url' => '/contactsmenu/contacts', 'verb' => 'POST'], ['name' => 'contactsMenu#findOne', 'url' => '/contactsmenu/findOne', 'verb' => 'POST'], - ['name' => 'AutoComplete#get', 'url' => 'autocomplete/get', 'verb' => 'GET'] + ['name' => 'AutoComplete#get', 'url' => 'autocomplete/get', 'verb' => 'GET'], + ['name' => 'WalledGarden#get', 'url' => '/204', 'verb' => 'GET'], ], 'ocs' => [ ['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'], diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 0e550b72532..cfd52fd6dfc 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -512,6 +512,7 @@ return array( 'OC\\Core\\Controller\\SetupController' => $baseDir . '/core/Controller/SetupController.php', 'OC\\Core\\Controller\\TwoFactorChallengeController' => $baseDir . '/core/Controller/TwoFactorChallengeController.php', 'OC\\Core\\Controller\\UserController' => $baseDir . '/core/Controller/UserController.php', + 'OC\\Core\\Controller\\WalledGardenController' => $baseDir . '/core/Controller/WalledGardenController.php', 'OC\\Core\\Middleware\\TwoFactorMiddleware' => $baseDir . '/core/Middleware/TwoFactorMiddleware.php', 'OC\\Core\\Migrations\\Version13000Date20170705121758' => $baseDir . '/core/Migrations/Version13000Date20170705121758.php', 'OC\\Core\\Migrations\\Version13000Date20170718121200' => $baseDir . '/core/Migrations/Version13000Date20170718121200.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 563c039d033..675219c0126 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -542,6 +542,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Controller\\SetupController' => __DIR__ . '/../../..' . '/core/Controller/SetupController.php', 'OC\\Core\\Controller\\TwoFactorChallengeController' => __DIR__ . '/../../..' . '/core/Controller/TwoFactorChallengeController.php', 'OC\\Core\\Controller\\UserController' => __DIR__ . '/../../..' . '/core/Controller/UserController.php', + 'OC\\Core\\Controller\\WalledGardenController' => __DIR__ . '/../../..' . '/core/Controller/WalledGardenController.php', 'OC\\Core\\Middleware\\TwoFactorMiddleware' => __DIR__ . '/../../..' . '/core/Middleware/TwoFactorMiddleware.php', 'OC\\Core\\Migrations\\Version13000Date20170705121758' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170705121758.php', 'OC\\Core\\Migrations\\Version13000Date20170718121200' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170718121200.php', |