diff --git a/backend/api/main.py b/backend/api/main.py index 912720e..227206a 100644 --- a/backend/api/main.py +++ b/backend/api/main.py @@ -24,7 +24,10 @@ from database.exercices.models import Exercice, ExerciceReadFull from services.jwt import revoke_access, revoke_refresh from services.password import get_password_hash -app = FastAPI(title="API Generateur d'exercices", root_path="/api") +app = FastAPI(title="API Generateur d'exercices", root_path="/api/", openapi_prefix="/api/") + + + origins = [ "http://localhost:8000", "https://localhost:8001", diff --git a/backend/api/routes/base.py b/backend/api/routes/base.py index ea335e6..9bcb105 100644 --- a/backend/api/routes/base.py +++ b/backend/api/routes/base.py @@ -1,8 +1,10 @@ from fastapi import APIRouter + import routes.auth.routes import routes.exercices.routes import routes.room.routes -api_router = APIRouter() + +api_router = APIRouter(prefix="/api") api_router.include_router(routes.auth.routes.router)