Krishna172912 commited on
Commit
50cc26e
Β·
unverified Β·
1 Parent(s): 461dcfe

Update app.js

Browse files
Files changed (1) hide show
  1. front_end/app.js +4 -2
front_end/app.js CHANGED
@@ -138,7 +138,8 @@ function startAnalysis() {
138
  // ─────────────────────────────────────────────
139
  async function connectToBackend(repoUrl) {
140
  try {
141
- const response = await fetch('http://localhost:8000/init-repo', {
 
142
  method: 'POST',
143
  headers: { 'Content-Type': 'application/json' },
144
  body: JSON.stringify({ url: repoUrl }),
@@ -417,7 +418,8 @@ async function sendMessage() {
417
  let fullMarkdown = '';
418
 
419
  try {
420
- const response = await fetch('http://localhost:8000/chat', {
 
421
  method: 'POST',
422
  headers: { 'Content-Type': 'application/json' },
423
  body: JSON.stringify({ message: text }),
 
138
  // ─────────────────────────────────────────────
139
  async function connectToBackend(repoUrl) {
140
  try {
141
+ //const response = await fetch('http://localhost:8000/init-repo', {
142
+ const response = await fetch('/init-repo', {
143
  method: 'POST',
144
  headers: { 'Content-Type': 'application/json' },
145
  body: JSON.stringify({ url: repoUrl }),
 
418
  let fullMarkdown = '';
419
 
420
  try {
421
+ //const response = await fetch('http://localhost:8000/chat', {
422
+ const response = await fetch('/chat', {
423
  method: 'POST',
424
  headers: { 'Content-Type': 'application/json' },
425
  body: JSON.stringify({ message: text }),