Remove debug logs

pull/1/head
yflory 2019-11-29 10:46:34 +01:00
parent 8a0e0621fb
commit 03701f02e0
1 changed files with 7 additions and 5 deletions

View File

@ -41,6 +41,7 @@ define([
if (err) { if (err) {
waitFor.abort(); waitFor.abort();
console.error(err); console.error(err);
return;
} }
try { try {
var parsed = JSON.parse(val); var parsed = JSON.parse(val);
@ -48,11 +49,11 @@ define([
} catch (e) { } catch (e) {
console.log("Can't parse user drive", e); console.log("Can't parse user drive", e);
} }
}); }));
}).nThen(function (waitFor) { }).nThen(function (waitFor) {
var wsUrl = NetConfig.getWebsocketURL(); var wsUrl = NetConfig.getWebsocketURL();
var w = waitFor(); var w = waitFor();
Netflux.connect(wsUrl).then(function (network) { Netflux.connect(wsUrl).then(function (_network) {
network = _network; network = _network;
w(); w();
}, function (err) { }, function (err) {
@ -69,7 +70,6 @@ define([
rpc = call; rpc = call;
})); }));
}).nThen(function () { }).nThen(function () {
console.log('IFRAME READY');
Test(function () { Test(function () {
// This is only here to maybe trigger an error. // This is only here to maybe trigger an error.
window.drive = proxy['drive']; window.drive = proxy['drive'];
@ -95,13 +95,15 @@ define([
console.log('CP receiving', data); console.log('CP receiving', data);
if (data.cmd === 'PING') { if (data.cmd === 'PING') {
ret.res = 'PONG'; ret.res = 'PONG';
} else if (data.cmd === 'LOGIN') {
UI.alert('okok');
return;
// XXX Display login modal....
} else if (data.cmd === 'SIGN') { } else if (data.cmd === 'SIGN') {
if (!AUTHORIZED_DOMAINS.filter(function (x) { return x.test(domain); }).length) { if (!AUTHORIZED_DOMAINS.filter(function (x) { return x.test(domain); }).length) {
ret.error = "UNAUTH_DOMAIN"; ret.error = "UNAUTH_DOMAIN";
} else if (!LocalStore.isLoggedIn()) { } else if (!LocalStore.isLoggedIn()) {
ret.error = "NOT_LOGGED_IN"; ret.error = "NOT_LOGGED_IN";
} else if ('LOGIN') {
// XXX Display login modal....
} else { } else {
return void whenReady(function () { return void whenReady(function () {
var sig = signMsg(data.data, proxy.edPrivate); var sig = signMsg(data.data, proxy.edPrivate);