Fix API URLs to use relative paths for production
Browse files
frontend/src/App.jsx
CHANGED
|
@@ -16,7 +16,7 @@ function App() {
|
|
| 16 |
}
|
| 17 |
// Note: File upload would need FormData, keeping it simple JSON for text for now
|
| 18 |
|
| 19 |
-
const response = await fetch('
|
| 20 |
method: 'POST',
|
| 21 |
headers: {
|
| 22 |
'Content-Type': 'application/json',
|
|
|
|
| 16 |
}
|
| 17 |
// Note: File upload would need FormData, keeping it simple JSON for text for now
|
| 18 |
|
| 19 |
+
const response = await fetch('/api/analyze/', {
|
| 20 |
method: 'POST',
|
| 21 |
headers: {
|
| 22 |
'Content-Type': 'application/json',
|
frontend/src/components/Results.jsx
CHANGED
|
@@ -26,7 +26,7 @@ const Results = ({ result, onReset }) => {
|
|
| 26 |
// Or update backend to echo back the text?
|
| 27 |
// Let's update App.jsx to attach `originalText` to the result object.
|
| 28 |
|
| 29 |
-
const response = await fetch('
|
| 30 |
method: 'POST',
|
| 31 |
headers: { 'Content-Type': 'application/json' },
|
| 32 |
body: JSON.stringify({
|
|
|
|
| 26 |
// Or update backend to echo back the text?
|
| 27 |
// Let's update App.jsx to attach `originalText` to the result object.
|
| 28 |
|
| 29 |
+
const response = await fetch('/api/report/', {
|
| 30 |
method: 'POST',
|
| 31 |
headers: { 'Content-Type': 'application/json' },
|
| 32 |
body: JSON.stringify({
|