forked from Qortal/qortal
Added LINK_TO_QDN_RESOURCE support in the gateway.
This commit is contained in:
parent
3cdfa4e276
commit
9c58faa7c2
@ -75,13 +75,19 @@ window.addEventListener("message", (event) => {
|
|||||||
if (data.service == null) data.service = "WEBSITE"; // Default to WEBSITE
|
if (data.service == null) data.service = "WEBSITE"; // Default to WEBSITE
|
||||||
if (qdnContext == "render") {
|
if (qdnContext == "render") {
|
||||||
url = "/render/" + data.service + "/" + data.name;
|
url = "/render/" + data.service + "/" + data.name;
|
||||||
|
if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path);
|
||||||
|
if (data.identifier != null) url = url.concat("?identifier=" + data.identifier);
|
||||||
|
}
|
||||||
|
else if (qdnContext == "gateway") {
|
||||||
|
url = "/" + data.service + "/" + data.name;
|
||||||
|
if (data.identifier != null) url = url.concat("/" + data.identifier);
|
||||||
|
if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// gateway / domainMap only serve websites right now
|
// domainMap only serves websites right now
|
||||||
url = "/" + data.name;
|
url = "/" + data.name;
|
||||||
|
if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path);
|
||||||
}
|
}
|
||||||
if (data.path != null) url = url.concat((data.path.startsWith("/") ? "" : "/") + data.path);
|
|
||||||
if (data.identifier != null) url = url.concat("?identifier=" + data.identifier);
|
|
||||||
|
|
||||||
window.location = url;
|
window.location = url;
|
||||||
response = true;
|
response = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user