Commit 35fbd024 authored by salma's avatar salma

fix serving endpoints tags

parent 396e5e31
......@@ -11,24 +11,6 @@ router = APIRouter(tags=["Curriculum"])
@router.get("/curriculum-upload")
async def serve_curriculum_upload():
"""Serve the curriculum upload HTML file"""
try:
static_file = Path("static/curriculum_PDF_uploader.html")
if static_file.exists():
return FileResponse(static_file)
current_file = Path("curriculum_PDF_uploader.html")
if current_file.exists():
return FileResponse(current_file)
raise HTTPException(status_code=404, detail="Curriculum upload interface not found")
except Exception as e:
print(f"Error serving curriculum upload interface: {e}")
raise HTTPException(status_code=500, detail=f"Error serving interface: {str(e)}")
@router.post("/process-curriculum", status_code=202)
async def process_curriculum_webhook(
......
......@@ -167,24 +167,6 @@ async def grade_quiz_handler(submission: QuizSubmission):
"results": results
}
@router.get("/test-yourself")
async def serve_test_yourself_interface():
"""Serve the interactive 'Test Yourself' HTML file"""
try:
# Check for the file in a 'static' folder first
static_file = Path("static/test_yourself_interface.html")
if static_file.exists():
return FileResponse(static_file)
# Fallback to the root directory
current_file = Path("test_yourself_interface.html")
if current_file.exists():
return FileResponse(current_file)
raise HTTPException(status_code=404, detail="Interactive quiz interface not found")
except Exception as e:
print(f"Error serving 'Test Yourself' interface: {e}")
raise HTTPException(status_code=500, detail=f"Error serving interface: {str(e)}")
@router.get("/quiz/options/curricula")
async def get_curricula_options(request: Request):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment