Skip to content

Commit

Permalink
Making owncloud/Sciebo working again
Browse files Browse the repository at this point in the history
See #65
Change path for retrieving userinfo from "/cloud/user" to "/cloud/users/USERNAME"
  • Loading branch information
michaelletzgus authored Nov 18, 2018
1 parent 1cd2daf commit 662f871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/nsNextcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 662f871

Please sign in to comment.