diff --git a/ebook_backend&admin_panel/admin-backend/main.py b/ebook_backend&admin_panel/admin-backend/main.py index 9c2d2b2..d7e459a 100644 --- a/ebook_backend&admin_panel/admin-backend/main.py +++ b/ebook_backend&admin_panel/admin-backend/main.py @@ -313,14 +313,14 @@ async def health_check() -> Dict[str, Any]: "database_status": db_status } -# Include routers +# Include routers - auth.router handles / and /login HTML pages app.include_router(auth.router, prefix="/auth", tags=["Auth"]) app.include_router(auth.router, prefix="", tags=["Auth"]) -# Root endpoint -@app.get("/", tags=["Root"]) -async def root() -> Dict[str, Any]: - """Root endpoint with API information""" +# API info endpoint (moved from / to /api to avoid conflict with auth.router) +@app.get("/api", tags=["API Info"]) +async def api_info() -> Dict[str, Any]: + """API information endpoint""" return { "message": AppConfig.APP_NAME, "version": AppConfig.VERSION,