summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2021-08-31 19:45:28 +0200
committerGitHub <noreply@github.com>2021-08-31 19:45:28 +0200
commitab592c99e6b05361b00681b33984e87cadfe2cc1 (patch)
tree2d9b96007eec0d10e69ca680db83b60967de3011 /core/src
parent734a750074c08051f3e24b7454f00018da868898 (diff)
parentd8cbb9fc7b670e3439cc48e06cae76da37f0be85 (diff)
downloadnextcloud-server-ab592c99e6b05361b00681b33984e87cadfe2cc1.tar.gz
nextcloud-server-ab592c99e6b05361b00681b33984e87cadfe2cc1.zip
Merge pull request #28506 from nextcloud/followup/27281/fix-oc-linktoocs
Fix OC.linkToOCS so it works as before @nextcloud/router v2.0.0
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/index.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/src/OC/index.js b/core/src/OC/index.js
index c7d2ba2c33d..ebf9171bada 100644
--- a/core/src/OC/index.js
+++ b/core/src/OC/index.js
@@ -286,9 +286,16 @@ export default {
*/
linkTo,
/**
+ * @param {String} service service name
+ * @param {Number} version OCS API version
+ * @returns {String} OCS API base path
* @deprecated 19.0.0 use `generateOcsUrl` from https://www.npmjs.com/package/@nextcloud/router
*/
- linkToOCS: generateOcsUrl,
+ linkToOCS: (service, version) => {
+ return generateOcsUrl(service, {}, {
+ ocsVersion: version || 1,
+ }) + '/'
+ },
/**
* @deprecated 19.0.0 use `generateRemoteUrl` from https://www.npmjs.com/package/@nextcloud/router
*/