Skip to content

Commit 99aefc0

Browse files
committed
ngrok
1 parent 47b5620 commit 99aefc0

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

frontend/src/app/search/page.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,11 @@ export default function Search() {
3434
}
3535

3636
try {
37-
const response = await fetch(
38-
"http://ec2-18-119-119-145.us-east-2.compute.amazonaws.com/api/process",
39-
{
40-
method: "POST",
41-
headers: { "Content-Type": "application/json" },
42-
body: JSON.stringify({ repo_url: url, feature_description: query }),
43-
}
44-
);
37+
const response = await fetch("https://e35d-208-98-222-98.ngrok-free.app/api/process", {
38+
method: "POST",
39+
headers: { "Content-Type": "application/json" },
40+
body: JSON.stringify({ repo_url: trimmedUrl, feature_description: trimmedQuery }),
41+
});
4542

4643
if (!response.ok) {
4744
console.error(response.status);
@@ -97,7 +94,8 @@ export default function Search() {
9794
setShowNotification(false);
9895
setSummaryContent(final);
9996
setShowSummary(true);
100-
} catch {
97+
} catch (error) {
98+
console.error("Error:", error);
10199
setNotificationMessage("Failed to connect to the server.");
102100
setShowNotification(true);
103101
}

0 commit comments

Comments
 (0)