Skip to content

Commit

Permalink
fix: user activities count bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wuranxu committed Jan 27, 2024
1 parent 2e72f9b commit 922ba5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/routers/operation/operation_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ async def list_user_operation(start_time: str, end_time: str, user_id: int, tag:
@router.get("/count")
async def list_user_activities(user_id: int, start_time: str, end_time: str, _=Depends(Permission())):
try:
start = datetime.strptime(start_time, "%Y-%m-%d")
end = datetime.strptime(end_time, "%Y-%m-%d")
start = datetime.strptime(start_time, "%Y-%m-%d").replace(hour=0, minute=0, second=0, microsecond=0)
end = datetime.strptime(end_time, "%Y-%m-%d").replace(hour=23, minute=59, second=59, microsecond=0)
records = await PityOperationDao.count_user_activities(user_id, start, end)
ans = list()
for r in records:
Expand Down

0 comments on commit 922ba5c

Please sign in to comment.