aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/OC/routing.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/OC/routing.js')
-rw-r--r--core/src/OC/routing.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/src/OC/routing.js b/core/src/OC/routing.js
new file mode 100644
index 00000000000..4b81714d6f0
--- /dev/null
+++ b/core/src/OC/routing.js
@@ -0,0 +1,18 @@
+/**
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+import {
+ getRootUrl as realGetRootUrl,
+} from '@nextcloud/router'
+
+/**
+ * Creates a relative url for remote use
+ *
+ * @param {string} service id
+ * @return {string} the url
+ */
+export const linkToRemoteBase = service => {
+ return realGetRootUrl() + '/remote.php/' + service
+}