show console.log in debug mode only

This commit is contained in:
Azgaar 2021-09-09 10:00:53 +03:00
parent 50dc5e3465
commit ec66527311

View file

@ -58,7 +58,7 @@ window.Cloud = (function () {
async save(fileName, contents) { async save(fileName, contents) {
if (!this.api) await this.auth(); if (!this.api) await this.auth();
const resp = this.call("filesUpload", {path: "/" + fileName, contents}); const resp = this.call("filesUpload", {path: "/" + fileName, contents});
console.log("Dropbox response:", resp); DEBUG && console.log("Dropbox response:", resp);
return true; return true;
}, },
@ -96,7 +96,7 @@ window.Cloud = (function () {
// Callback function for auth window. // Callback function for auth window.
setDropBoxToken(token) { setDropBoxToken(token) {
console.log("Access token got:", token); DEBUG && console.log("Access token:", token);
setToken(this.name, token); setToken(this.name, token);
this.connect(token); this.connect(token);
this.authWindow.close(); this.authWindow.close();
@ -122,7 +122,7 @@ window.Cloud = (function () {
allow_download: true allow_download: true
} }
}); });
console.log("dropbox link object:", resp.result); DEBUG && console.log("Dropbox link object:", resp.result);
return resp.result.url; return resp.result.url;
} }
}; };