Skip to content

Commit 6e496ca

Browse files
committed
updating script endpoint to include full path
1 parent 53f9996 commit 6e496ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h6>📝 Try Asking:</h6>
126126
loadingSpinner.style.display = "block";
127127

128128
try {
129-
let response = await fetch("/ask", {
129+
let response = await fetch(document.URL+"/ask", {
130130
method: "POST",
131131
headers: { "Content-Type": "application/json" },
132132
body: JSON.stringify({ question: userQuestion })
@@ -208,7 +208,7 @@ <h6>📝 Try Asking:</h6>
208208
console.log("🟡 Sending feedback for Query ID:", queryId, "Feedback:", feedback);
209209

210210
// ✅ Send feedback to backend
211-
let response = await fetch("/feedback", {
211+
let response = await fetch(document.URL+"/feedback", {
212212
method: "POST",
213213
headers: { "Content-Type": "application/json" },
214214
body: JSON.stringify({
@@ -229,7 +229,7 @@ <h6>📝 Try Asking:</h6>
229229

230230

231231
async function loadCrimeStats() {
232-
let res = await fetch("/crime-stats");
232+
let res = await fetch(document.URL+"/crime-stats");
233233
let data = await res.json();
234234

235235
document.getElementById("mostCommonCrime").innerText = data.most_common_crime;

0 commit comments

Comments
 (0)