fix: api key header
This commit is contained in:
parent
b3193ee56d
commit
1fe6a06a5f
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
"""Dependencies for FastAPI routers."""
|
||||
|
||||
from fastapi import Depends
|
||||
from fastapi import HTTPException
|
||||
from fastapi import status
|
||||
from fastapi.security import APIKeyHeader
|
||||
|
|
@ -15,7 +16,7 @@ api_key_header: SecurityBase = APIKeyHeader(
|
|||
)
|
||||
|
||||
|
||||
def require_pp_api_key(*, api_key: str = api_key_header) -> None:
|
||||
def require_pp_api_key(api_key: str = Depends(api_key_header)) -> None:
|
||||
"""Validate the preprocessor API key.
|
||||
|
||||
Args:
|
||||
|
|
@ -39,7 +40,7 @@ db_api_key_header: SecurityBase = APIKeyHeader(
|
|||
)
|
||||
|
||||
|
||||
def require_db_api_key(*, api_key: str = db_api_key_header) -> None:
|
||||
def require_db_api_key(api_key: str = Depends(db_api_key_header)) -> None:
|
||||
"""Validate the database API key.
|
||||
|
||||
Args:
|
||||
|
|
|
|||
Loading…
Reference in a new issue