11from flask import Flask , jsonify , request
22from flask_cors import CORS
3- from app . services .topic_service import TopicService
4- from app . services .ai_service import AITopicProcessor
3+ from services .topic_service import TopicService
4+ from services .ai_service import AITopicProcessor
55
66app = Flask (__name__ )
77CORS (app , resources = {
1515topic_service = TopicService ()
1616ai_processor = AITopicProcessor ()
1717
18- @app .route ('/process-topics' , methods = ['GET' , 'POST' ])
18+ @app .route ('/api/ process-topics' , methods = ['GET' , 'POST' ])
1919def 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' ])
3737def ai_process ():
3838 try :
3939 if request .method == 'POST' :
@@ -77,4 +77,4 @@ def home():
7777 print ("Starting Flask server..." )
7878 port = 5002
7979 print (f"Server running on: http://127.0.0.1:{ port } " )
80- app .run (host = '127.0.0.1' , port = port , debug = True )
80+ app .run (host = '127.0.0.1' , port = port , debug = True )
0 commit comments