fix(webui): rewrite unknown watcher buckets for all query routes
This commit is contained in:
@@ -1584,8 +1584,7 @@
|
|||||||
window.fetch = function (input, init) {
|
window.fetch = function (input, init) {
|
||||||
try {
|
try {
|
||||||
const url = typeof input === "string" ? input : String(input && input.url || "");
|
const url = typeof input === "string" ? input : String(input && input.url || "");
|
||||||
const isCategoryBuilderRoute = /^#\/settings\/category-builder(?:[/?#]|$)/i.test(window.location.hash || "");
|
if (/\/api\/0\/query\/?$/i.test(url) && init && typeof init.body === "string") {
|
||||||
if (isCategoryBuilderRoute && /\/api\/0\/query\/?$/i.test(url) && init && typeof init.body === "string") {
|
|
||||||
init = Object.assign({}, init, {
|
init = Object.assign({}, init, {
|
||||||
body: rewriteUnknownCategoryBuilderQueryBody(init.body)
|
body: rewriteUnknownCategoryBuilderQueryBody(init.body)
|
||||||
});
|
});
|
||||||
@@ -1609,8 +1608,7 @@
|
|||||||
proto.send = function (body) {
|
proto.send = function (body) {
|
||||||
try {
|
try {
|
||||||
const url = String(this.__awRuUrl || "");
|
const url = String(this.__awRuUrl || "");
|
||||||
const isCategoryBuilderRoute = /^#\/settings\/category-builder(?:[/?#]|$)/i.test(window.location.hash || "");
|
if (/\/api\/0\/query\/?$/i.test(url) && typeof body === "string") {
|
||||||
if (isCategoryBuilderRoute && /\/api\/0\/query\/?$/i.test(url) && typeof body === "string") {
|
|
||||||
body = rewriteUnknownCategoryBuilderQueryBody(body);
|
body = rewriteUnknownCategoryBuilderQueryBody(body);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user