fix: version update. rss add bugs.

This commit is contained in:
EstrellaXD
2023-09-06 23:49:20 +08:00
parent 2e4cf0d621
commit aeac217138
14 changed files with 42 additions and 34 deletions

View File

@@ -31,7 +31,7 @@ async def login(response: Response, form_data=Depends(OAuth2PasswordRequestForm)
@router.get("/refresh_token", response_model=dict, dependencies=[Depends(get_current_user)])
async def refresh(response: Response):
token = create_access_token(
data={"sub": get_current_user()}, expires_delta=timedelta(days=1)
data={"sub": active_user[0]}, expires_delta=timedelta(days=1)
)
response.set_cookie(key="token", value=token, httponly=True, max_age=86400)
return {"access_token": token, "token_type": "bearer"}