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();