From 7d4392c067d63cffd940fb97cdfbd2d1324bd2ca Mon Sep 17 00:00:00 2001 From: Larko <59736843+Larkooo@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:35:24 +0700 Subject: [PATCH] fix(torii-sql): sql playground for slot (#2779) --- crates/torii/server/static/sql-playground.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/torii/server/static/sql-playground.html b/crates/torii/server/static/sql-playground.html index 52f7f0c65a..2e06ac4a6b 100644 --- a/crates/torii/server/static/sql-playground.html +++ b/crates/torii/server/static/sql-playground.html @@ -374,7 +374,7 @@ ORDER BY m.name, p.cid; `; const response = await fetch( - "/sql?" + new URLSearchParams({ query: schemaQuery }) + `${window.location.href}?` + new URLSearchParams({ query: schemaQuery }) ); if (!response.ok) throw new Error("Failed to fetch schema"); const data = await response.json(); @@ -508,7 +508,7 @@ const startTime = performance.now(); try { const response = await fetch( - "/sql?" + new URLSearchParams({ query }) + `${window.location.href}?` + new URLSearchParams({ query }) ); if (!response.ok) throw new Error(await response.text()); const data = await response.json();