feat((model api key) and app):
fix bug
This commit is contained in:
@@ -652,7 +652,7 @@ class ModelApiKeyService:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def record_api_key_usage(db: Session, api_key_id: uuid.UUID | None) -> bool:
|
def record_api_key_usage(db: Session, api_key_id: uuid.UUID | None) -> bool:
|
||||||
"""记录API Key使用"""
|
"""记录API Key使用"""
|
||||||
if not api_key_id:
|
if api_key_id:
|
||||||
success = ModelApiKeyRepository.update_usage(db, api_key_id)
|
success = ModelApiKeyRepository.update_usage(db, api_key_id)
|
||||||
if success:
|
if success:
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user