feat: schedule periodic reports asynchronously
This commit is contained in:
@@ -62,5 +62,10 @@ def periodic_reports(
|
||||
db: Session = Depends(get_db),
|
||||
current_user: User = Depends(get_current_user),
|
||||
) -> dict:
|
||||
reports = PeriodicReportService.list_user_reports(db, user_id=current_user.id, limit=max(1, min(limit, 50)))
|
||||
reports = PeriodicReportService.list_user_reports(
|
||||
db,
|
||||
user_id=current_user.id,
|
||||
limit=max(1, min(limit, 50)),
|
||||
statuses=("success",),
|
||||
)
|
||||
return api_success([periodic_report_dict(item) for item in reports])
|
||||
|
||||
Reference in New Issue
Block a user