chore: parse DEBUG setting as an object

This commit is contained in:
Azgaar 2024-10-22 14:45:25 +02:00
parent 6d69eb855f
commit 5ac99d180d
8 changed files with 28 additions and 17 deletions

View file

@ -60,7 +60,7 @@ window.Cloud = (function () {
async save(fileName, contents) {
const resp = await this.call("filesUpload", {path: "/" + fileName, contents});
DEBUG && console.info("Dropbox response:", resp);
DEBUG.cloud && console.info("Dropbox response:", resp);
return true;
},
@ -104,7 +104,7 @@ window.Cloud = (function () {
// Callback function for auth window
async setDropBoxToken(token) {
DEBUG && console.info("Access token:", token);
DEBUG.cloud && console.info("Access token:", token);
setToken(this.name, token);
await this.connect(token);
this.authWindow.close();
@ -131,7 +131,7 @@ window.Cloud = (function () {
allow_download: true
};
const resp = await this.call("sharingCreateSharedLinkWithSettings", {path, settings});
DEBUG && console.info("Dropbox link object:", resp.result);
DEBUG.cloud && console.info("Dropbox link object:", resp.result);
return resp.result.url;
}
};