Adding all fastapi_users routes incluing Google and Discord

This commit is contained in:
2025-04-03 19:24:10 +02:00
parent a0f2284efa
commit b89bb484b7
8 changed files with 25 additions and 12 deletions

View File

@@ -3,7 +3,8 @@ from contextlib import asynccontextmanager
from fastapi import FastAPI
from hub import init_db as hub_init_db
from hub.auth import oauth_router
from hub.auth import auth_router, register_router, password_router, verification_router, users_router, \
google_oauth_router, discord_oauth_router
if __name__ == '__main__':
import uvicorn
@@ -20,8 +21,10 @@ async def lifespan(app: FastAPI):
app = FastAPI(root_path="/api/v1", lifespan=lifespan)
app.include_router(
oauth_router,
prefix="/auth/google",
tags=["auth"],
)
app.include_router(register_router, tags=["Auth"], )
app.include_router(auth_router, prefix="/auth", tags=["Auth"], )
app.include_router(google_oauth_router, prefix="/auth/google", tags=["Auth"])
app.include_router(discord_oauth_router, prefix="/auth/discord", tags=["Auth"])
app.include_router(verification_router, prefix="/auth/verification", tags=["Auth"], )
app.include_router(users_router, prefix="/users", tags=["Users"], )
app.include_router(password_router, prefix="/users", tags=["Users"], )