summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-03-23 16:33:11 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2020-04-18 11:21:28 +0200
commit3f8168b6e5c0fc14709b713d9ca4943f9df70273 (patch)
tree4f8e0a487f6a1c50c041ac96da2f024b86ab1532 /apps
parent64196ddd19684b6a218428eeb6ee370d0514b68c (diff)
downloadnextcloud-server-3f8168b6e5c0fc14709b713d9ca4943f9df70273.tar.gz
nextcloud-server-3f8168b6e5c0fc14709b713d9ca4943f9df70273.zip
Allow some apps to have root URLs in their own routing file
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/cloud_federation_api/appinfo/routes.php36
-rw-r--r--apps/files/appinfo/routes.php7
-rw-r--r--apps/files_sharing/appinfo/routes.php31
3 files changed, 74 insertions, 0 deletions
diff --git a/apps/cloud_federation_api/appinfo/routes.php b/apps/cloud_federation_api/appinfo/routes.php
new file mode 100644
index 00000000000..49ea1155305
--- /dev/null
+++ b/apps/cloud_federation_api/appinfo/routes.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2020 Joas Schilling <coding@schilljs.com>
+ *
+ * @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/>.
+ *
+ */
+
+return [
+ [
+ 'name' => 'RequestHandler#addShare',
+ 'url' => '/ocm/shares',
+ 'verb' => 'POST',
+ 'root' => '',
+ ],
+ [
+ 'name' => 'RequestHandler#receiveNotification',
+ 'url' => '/ocm/notifications',
+ 'verb' => 'POST',
+ 'root' => '',
+ ],
+];
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
index 825249b0874..01d1e14054a 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -42,6 +42,13 @@ $application->registerRoutes(
[
'routes' => [
[
+ 'name' => 'View#showFile',
+ 'url' => '/f/{fileid}',
+ 'verb' => 'GET',
+ 'root' => '',
+ ],
+
+ [
'name' => 'API#getThumbnail',
'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
'verb' => 'GET',
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php
index 1346e0c6899..a4edada738c 100644
--- a/apps/files_sharing/appinfo/routes.php
+++ b/apps/files_sharing/appinfo/routes.php
@@ -31,6 +31,37 @@ return [
],
'routes' => [
[
+ 'name' => 'Share#showShare',
+ 'url' => '/s/{token}',
+ 'verb' => 'GET',
+ 'root' => '',
+ ],
+ [
+ 'name' => 'Share#showAuthenticate',
+ 'url' => '/s/{token}/authenticate/{redirect}',
+ 'verb' => 'GET',
+ 'root' => '',
+ ],
+ [
+ 'name' => 'Share#authenticate',
+ 'url' => '/s/{token}/authenticate/{redirect}',
+ 'verb' => 'POST',
+ 'root' => '',
+ ],
+ [
+ 'name' => 'Share#downloadShare',
+ 'url' => '/s/{token}/download',
+ 'verb' => 'GET',
+ 'root' => '',
+ ],
+ [
+ 'name' => 'PublicPreview#directLink',
+ 'url' => '/s/{token}/preview',
+ 'verb' => 'GET',
+ 'root' => '',
+ ],
+
+ [
'name' => 'externalShares#testRemote',
'url' => '/testremote',
'verb' => 'GET'