mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
remove trailing slash before endpoint check
This commit is contained in:
parent
1a152d0115
commit
7442794d2e
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue