remove trailing slash before endpoint check

This commit is contained in:
ali 2026-04-02 01:47:15 +02:00
parent 1a152d0115
commit 7442794d2e
No known key found for this signature in database
GPG key ID: 44F9B42770617B9B

View file

@ -57,6 +57,8 @@ async def check_subscription_status(request, user_id, tier, organization_id=None
async def _update_last_used(api_key_id: int, endpoint: str) -> None:
# remove trailing slash
endpoint = endpoint.rstrip("/")
if not endpoint.endswith("/optimize"):
# reduce the load on the database by updating last_used only for optimize endpoint only
return