This commit is contained in:
2025-06-09 00:18:57 +08:00
parent e3dbe8a7d3
commit 8226a78482
10 changed files with 196 additions and 92 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import time
from typing import Annotated, Optional
from typing import Annotated
from redis import Redis
from sqlalchemy.orm import Session
from fastapi import Depends, Header
@@ -16,7 +16,7 @@ SessionDep = Annotated[Session, Depends(get_db)]
RedisDep = Annotated[Redis, Depends(get_redis)]
def alterToken(redis:RedisDep,alter_token: Optional[str] = Header(None)):
def alterToken(redis:RedisDep,alter_token: str | None = Header(None)):
if alter_token is not None:
try:
decoded_bytes = base64.b64decode(alter_token)