- Getting containers ready for the cloud
This commit is contained in:
@@ -6,7 +6,7 @@ from flask import current_app, request, session
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from common.extensions import socketio, kms_client, db
|
||||
from common.extensions import socketio, db, simple_encryption
|
||||
from common.models.user import Tenant
|
||||
from common.models.interaction import Interaction
|
||||
from common.utils.celery_utils import current_celery
|
||||
@@ -156,7 +156,7 @@ def handle_feedback(data):
|
||||
|
||||
def validate_api_key(tenant_id, api_key):
|
||||
tenant = Tenant.query.get_or_404(tenant_id)
|
||||
decrypted_api_key = kms_client.decrypt_api_key(tenant.encrypted_chat_api_key)
|
||||
decrypted_api_key = simple_encryption.decrypt_api_key(tenant.encrypted_chat_api_key)
|
||||
|
||||
return decrypted_api_key == api_key
|
||||
|
||||
|
||||
Reference in New Issue
Block a user