fix: 🐛 limits (#2058)

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):
This commit is contained in:
Stan Girard 2024-01-22 12:09:22 -08:00 committed by GitHub
parent 2f534f6a73
commit e92e61326f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,7 +233,7 @@ class UserUsage(Repository):
""" """
Fetch the user request count from the database 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 = ( response = (
self.db.from_("user_daily_usage") self.db.from_("user_daily_usage")