From e08a8af7ad306281e375c02230226e2195a449cb Mon Sep 17 00:00:00 2001 From: Sudhanshu-NITR Date: Tue, 3 Mar 2026 23:41:09 +0530 Subject: [PATCH] fix API user quota logic flaw Prior to this fix, the application bypassed quota incrementation for brand new API key requests. This assigns the dictionary and allows it to fall through to the proper count increment logic. --- app/routes/api.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/routes/api.py b/app/routes/api.py index f6e4b12..bc0f5ff 100644 --- a/app/routes/api.py +++ b/app/routes/api.py @@ -51,7 +51,6 @@ def check_quota(api_key: str) -> bool: if api_key not in user_quotas: user_quotas[api_key] = {"count": 0, "date": today} - return True # reset quota daily if user_quotas[api_key]["date"] != today: