still refactoring some promise stuff
This commit is contained in:
parent
fc3ffcc681
commit
d63621387e
12
main.js
12
main.js
|
@ -423,7 +423,7 @@ function decryptstring(str)
|
||||||
{
|
{
|
||||||
if (!str.startsWith("-----BEGIN PGP MESSAGE-----"))
|
if (!str.startsWith("-----BEGIN PGP MESSAGE-----"))
|
||||||
{
|
{
|
||||||
console.log("string is not encrypted");
|
// console.log(str + ": string is not encrypted");
|
||||||
return Promise.resolve(str);
|
return Promise.resolve(str);
|
||||||
}
|
}
|
||||||
console.log("decrypting...");
|
console.log("decrypting...");
|
||||||
|
@ -1540,8 +1540,7 @@ function queryremote(params)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var data = {};
|
var data = {};
|
||||||
try
|
|
||||||
{
|
|
||||||
decryptstring(xhr.responseText)
|
decryptstring(xhr.responseText)
|
||||||
.then(decrypted =>
|
.then(decrypted =>
|
||||||
{
|
{
|
||||||
|
@ -1569,12 +1568,11 @@ function queryremote(params)
|
||||||
notepage.style.display = "table";
|
notepage.style.display = "table";
|
||||||
apply(data);
|
apply(data);
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
.catch( error =>
|
||||||
catch(error)
|
|
||||||
{
|
{
|
||||||
failed("Handler result is not valid. JS error: " + error);
|
failed("Handler result is not valid. JS error: " + error);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue