Skip to content

Commit 751987f

Browse files
author
user
committed
Change api endpoint with /api prefix
1 parent 2e5bb58 commit 751987f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

backend/app/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
topic_service = TopicService()
1616
ai_processor = AITopicProcessor()
1717

18-
@app.route('/process-topics', methods=['GET', 'POST'])
18+
@app.route('/api/process-topics', methods=['GET', 'POST'])
1919
def process_topics():
2020
try:
2121
if request.method == 'POST':
@@ -33,7 +33,7 @@ def process_topics():
3333
"message": "An error occurred while processing the request"
3434
}), 500
3535

36-
@app.route('/ai-process', methods=['GET', 'POST'])
36+
@app.route('/api/ai-process', methods=['GET', 'POST'])
3737
def ai_process():
3838
try:
3939
if request.method == 'POST':

src/components/TopicRefiner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const TopicRefiner: FC<TopicRefinerProps> = ({
8484
}
8585

8686
try {
87-
const response = await fetch('http://127.0.0.1:5002/ai-process', {
87+
const response = await fetch('/api/ai-process', {
8888
method: 'POST',
8989
headers: {
9090
'Content-Type': 'application/json',
@@ -369,4 +369,4 @@ export const TopicRefiner: FC<TopicRefinerProps> = ({
369369
)}
370370
</>
371371
);
372-
};
372+
};

src/views/TopicHistogram.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const TopicHistogram: FC = () => {
173173

174174
setIsLoading(true);
175175

176-
fetch('http://127.0.0.1:5002/process-topics', {
176+
fetch('/api/process-topics', {
177177
method: 'POST',
178178
headers: {
179179
'Content-Type': 'application/json',
@@ -427,4 +427,4 @@ const TopicHistogram: FC = () => {
427427
);
428428
};
429429

430-
export default TopicHistogram;
430+
export default TopicHistogram;

0 commit comments

Comments
 (0)