diff options
author | Parker <contact@pkrm.dev> | 2024-11-05 15:02:21 -0600 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-11-05 15:02:21 -0600 |
commit | 6f7e810916fd2de39d451886bbe18167e1784315 (patch) | |
tree | 795523eb94a00bce41475e444bab60487b31daab /app/main.py | |
parent | d74ae5e11603c33a5deafbcdc202fd13e57cfe0a (diff) |
stuff
Diffstat (limited to 'app/main.py')
-rw-r--r-- | app/main.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/main.py b/app/main.py index 8b3f68b..3ef89f2 100644 --- a/app/main.py +++ b/app/main.py @@ -2,9 +2,8 @@ from fastapi import FastAPI, Depends, Request from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import RedirectResponse from fastapi.templating import Jinja2Templates +from app.routes.auth_routes import router as auth_router from app.routes.links_routes import router as links_router -from app.routes.refresh_route import router as refresh_router -from app.routes.token_route import router as token_router from app.routes.user_routes import router as user_router from typing import Annotated from fastapi.exceptions import HTTPException @@ -35,13 +34,8 @@ app.add_middleware( templates = Jinja2Templates(directory="app/templates") # Import routes +app.include_router(auth_router, prefix="/api") app.include_router(links_router, prefix="/api") -# Must not have a prefix... for some reason you can't change -# the prefix of the Swagger UI OAuth2 redirect to /api/token -# you can only change it to /token, so we have to remove the -# prefix in order to keep logging in via Swagger UI working -app.include_router(token_router) -app.include_router(refresh_router, prefix="/api") app.include_router(user_router, prefix="/api") |