mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-11-14 11:43:12 +00:00
added condition for private services
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user