DeepRat commited on
Commit
85d983d
·
verified ·
1 Parent(s): 29384ce

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +2 -2
static/index.html CHANGED
@@ -168,7 +168,7 @@
168
  resultContainer.classList.add('hidden');
169
 
170
  try {
171
- const response = await fetch('/analyze', {
172
  method: 'POST',
173
  headers: {
174
  'Content-Type': 'application/json',
@@ -177,7 +177,7 @@
177
  });
178
 
179
  if (!response.ok) {
180
- throw new Error(`Server returned ${response.status}`);
181
  }
182
 
183
  const data = await response.json();
 
168
  resultContainer.classList.add('hidden');
169
 
170
  try {
171
+ const response = await fetch(window.location.origin + '/analyze', {
172
  method: 'POST',
173
  headers: {
174
  'Content-Type': 'application/json',
 
177
  });
178
 
179
  if (!response.ok) {
180
+ throw new Error(Server returned ${response.status});
181
  }
182
 
183
  const data = await response.json();