Skip to content

Commit

Permalink
fix: 🐛 limits (#2058)
Browse files Browse the repository at this point in the history
now monthly and better reading database

# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
StanGirard authored Jan 22, 2024
1 parent 2f534f6 commit e92e613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/models/databases/supabase/user_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def get_user_requests_count_for_month(self, user_id, date):
"""
Fetch the user request count from the database
"""
date_30_days_ago = datetime.now() - timedelta(days=30)
date_30_days_ago = (datetime.now() - timedelta(days=30)).strftime("%Y%m%d")

response = (
self.db.from_("user_daily_usage")
Expand Down

0 comments on commit e92e613

Please sign in to comment.