diff options
author | szaimen <szaimen@e.mail.de> | 2021-08-31 19:45:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 19:45:28 +0200 |
commit | ab592c99e6b05361b00681b33984e87cadfe2cc1 (patch) | |
tree | 2d9b96007eec0d10e69ca680db83b60967de3011 /core/src | |
parent | 734a750074c08051f3e24b7454f00018da868898 (diff) | |
parent | d8cbb9fc7b670e3439cc48e06cae76da37f0be85 (diff) | |
download | nextcloud-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.js | 9 |
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 */ |