mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
added condition for private services
This commit is contained in:
parent
304905a64f
commit
c14d7a0f60
@ -882,6 +882,12 @@ class WebBrowser extends LitElement {
|
||||
response = JSON.stringify(data);
|
||||
break
|
||||
}
|
||||
if (!data.encrypt && data.service.endsWith("_PRIVATE")) {
|
||||
let data = {};
|
||||
data['error'] = "Only encrypted data can go into private services";
|
||||
response = JSON.stringify(data);
|
||||
break
|
||||
}
|
||||
|
||||
if (data.encrypt) {
|
||||
try {
|
||||
@ -1042,6 +1048,10 @@ class WebBrowser extends LitElement {
|
||||
identifier = 'default';
|
||||
}
|
||||
|
||||
if (!data.encrypt && service.endsWith("_PRIVATE")) {
|
||||
throw new Error("Only encrypted data can go into private services")
|
||||
}
|
||||
|
||||
if (data.encrypt) {
|
||||
try {
|
||||
const encryptDataResponse = encryptData({
|
||||
|
Loading…
x
Reference in New Issue
Block a user