Skip to content

Commit

Permalink
loan history api 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
onaries committed Feb 10, 2024
1 parent f4f844d commit 27da394
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ async def get_loan_detail_history(id: int, db: Session = Depends(get_db)):
if history.amount != prev_amount:
data[history.updated_at.strftime("%Y-%m-%d")] = history.amount

prev_amount = history.amount

result = []
for k, v in data.items():
result.append(dict(date=k, amount=v))
Expand Down

0 comments on commit 27da394

Please sign in to comment.