mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 01:53:39 +01:00
Properly depend on security
This commit is contained in:
parent
03fb84b3f8
commit
1e0a391ae5
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ app.state.last_sender_ts = datetime.utcnow()
|
|||
app.state.ws_connected = Lock()
|
||||
|
||||
|
||||
async def is_authenticated(credentials: Annotated[HTTPAuthCreds, security]):
|
||||
async def is_authenticated(credentials: Annotated[HTTPAuthCreds, Depends(security)]):
|
||||
if credentials.credentials != app.state.bot.http.token:
|
||||
raise HTTPException(status_code=401, detail="Invalid secret.")
|
||||
|
||||
|
|
Loading…
Reference in a new issue