From 662f8711f2a89749747daec74e9f097870bc2054 Mon Sep 17 00:00:00 2001 From: michaelletzgus Date: Sun, 18 Nov 2018 13:53:09 +0100 Subject: Making owncloud/Sciebo working again See https://github.com/nextcloud/nextcloud-filelink/issues/65 Change path for retrieving userinfo from "/cloud/user" to "/cloud/users/USERNAME" --- src/components/nsNextcloud.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/nsNextcloud.js b/src/components/nsNextcloud.js index f20ab9a..f388555 100644 --- a/src/components/nsNextcloud.js +++ b/src/components/nsNextcloud.js @@ -39,6 +39,7 @@ Cu.importGlobalProperties(["XMLHttpRequest"]); const kRestBase = "/ocs/v1.php"; const kAuthPath = kRestBase + "/cloud/user"; +const kInfoPath = kRestBase + "/cloud/users"; const kShareApp = kRestBase + "/apps/files_sharing/api/v1/shares"; const kWebDavPath = "/remote.php/webdav"; @@ -576,7 +577,7 @@ Nextcloud.prototype = { let args = "?format=json"; let req = new XMLHttpRequest(Ci.nsIXMLHttpRequest); - req.open("GET", this._fullUrl + kAuthPath + args, true); + req.open("GET", this._fullUrl + kInfoPath + '/' + this._userName + args, true); req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); req.setRequestHeader("OCS-APIREQUEST", "true"); req.setRequestHeader("Authorization", -- cgit v1.2.3