From cd784295408baa010fa10a8d538072c65f8d4720 Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Fri, 19 Apr 2024 02:30:14 +0500 Subject: [PATCH] backend: set api prefix to `/api/` --- backend/main.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/main.py b/backend/main.py index d9e89c6..b888248 100644 --- a/backend/main.py +++ b/backend/main.py @@ -33,16 +33,18 @@ TAGS = [ app = FastAPI( openapi_tags=TAGS, title="AniX API", - description="unofficial API proxy for Anixart android application.",) + description="unofficial API proxy for Anixart android application.", + openapi_url="/api/openapi.json", + docs_url="/api/docs", redoc_url=None) -app.include_router(profile.router, prefix="/profile", tags=["Profile"]) -app.include_router(auth.router, prefix="/auth", tags=["Profile"]) +app.include_router(profile.router, prefix="/api/profile", tags=["Profile"]) +app.include_router(auth.router, prefix="/api/auth", tags=["Profile"]) -app.include_router(release.router, prefix="/release", tags=["Releases"]) +app.include_router(release.router, prefix="/api/release", tags=["Releases"]) -app.include_router(index.router, prefix="/index", tags=["Index"]) -app.include_router(favorites.router, prefix="/favorites", tags=["Favorites"]) -app.include_router(search.router, prefix="/search", tags=["Search"]) +app.include_router(index.router, prefix="/api/index", tags=["Index"]) +app.include_router(favorites.router, prefix="/api/favorites", tags=["Favorites"]) +app.include_router(search.router, prefix="/api/search", tags=["Search"]) if __name__ == "__main__": uvicorn.run("main:app", host="0.0.0.0", port=8000)