Fix: add future annotations to all files, fix date field name shadowing type in RewardRedeemRequest
This commit is contained in:
parent
16d00fbd1b
commit
7846e3445d
32 changed files with 70 additions and 5 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Annotated
|
||||
from datetime import date
|
||||
import uuid as uuid_mod
|
||||
|
|
@ -141,7 +143,7 @@ async def redeem(
|
|||
user: Annotated[User, Depends(get_current_user)],
|
||||
db: Annotated[AsyncSession, Depends(get_db)],
|
||||
):
|
||||
result = await redeem_reward(db, user.id, uuid_mod.UUID(reward_id), req.date)
|
||||
result = await redeem_reward(db, user.id, uuid_mod.UUID(reward_id), req.redemption_date)
|
||||
if not result["success"]:
|
||||
raise HTTPException(status_code=400, detail=result["reason"])
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue