mirror of
https://github.com/nextcloud/server.git
synced 2026-02-27 18:37:17 +01:00
Allow creating OCS v2 links in JS
This commit is contained in:
@@ -119,10 +119,12 @@ var OC={
|
||||
/**
|
||||
* Gets the base path for the given OCS API service.
|
||||
* @param {string} service name
|
||||
* @param {int} version OCS API version
|
||||
* @return {string} OCS API base path
|
||||
*/
|
||||
linkToOCS: function(service) {
|
||||
return window.location.protocol + '//' + window.location.host + OC.webroot + '/ocs/v1.php/' + service + '/';
|
||||
linkToOCS: function(service, version) {
|
||||
version = (version !== 2) ? 1 : 2;
|
||||
return window.location.protocol + '//' + window.location.host + OC.webroot + '/ocs/v' + version + '.php/' + service + '/';
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user