fix: save store API key in database after encryption (#2866)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-07-22 09:52:38 -03:00 committed by GitHub
commit 922ed594e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,6 +71,7 @@ def save_store_api_key(
# Encrypt the API key
encrypted = auth_utils.encrypt_api_key(api_key, settings_service=settings_service)
current_user.store_api_key = encrypted
db.add(current_user)
db.commit()
return {"detail": "API Key saved"}
except Exception as e: