Skip to content

Commit

Permalink
fix: api key dependency (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedir Zadniprovskyi authored and fedirz committed Jan 7, 2025
1 parent 30e776b commit 307e23f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/faster_whisper_server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)
from fastapi.middleware.cors import CORSMiddleware

from faster_whisper_server.dependencies import get_config, get_model_manager, verify_api_key
from faster_whisper_server.dependencies import ApiKeyDependency, get_config, get_model_manager
from faster_whisper_server.logger import setup_logger
from faster_whisper_server.routers.list_models import (
router as list_models_router,
Expand Down Expand Up @@ -51,7 +51,7 @@ async def lifespan(_app: FastAPI) -> AsyncGenerator[None, None]:

dependencies = []
if config.api_key is not None:
dependencies.append(verify_api_key)
dependencies.append(ApiKeyDependency)

app = FastAPI(lifespan=lifespan, dependencies=dependencies)

Expand Down

0 comments on commit 307e23f

Please sign in to comment.