Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI, Depends, HTTPException, status, Response | |
| from fastapi.middleware.cors import CORSMiddleware | |
| from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials | |
| from firebase_admin import auth, credentials, firestore | |
| from firebase_admin import auth | |
| from app.core.firebase import db, get_firebase_app # Modifier cette ligne | |
| from app.api.endpoints.videos import router as videos_router | |
| get_firebase_app() | |
| app = FastAPI() | |
| # Configuration CORS | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["*"], | |
| allow_credentials=True, | |
| allow_methods=["POST", "GET"], | |
| allow_headers=["*"] | |
| ) | |
| app.include_router(videos_router, prefix="/api") | |
| async def root(): | |
| return {"message": "API is running"} |