mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-13 07:14:54 +03:00
20 lines
527 B
Python
20 lines
527 B
Python
from uuid import UUID
|
|
|
|
from models import get_supabase_client
|
|
|
|
from repository.external_api_secret.utils import build_secret_unique_name
|
|
|
|
|
|
def delete_secret(user_id: UUID, brain_id: UUID, secret_name: str) -> bool:
|
|
supabase_client = get_supabase_client()
|
|
response = supabase_client.rpc(
|
|
"delete_secret",
|
|
{
|
|
"secret_name": build_secret_unique_name(
|
|
user_id=user_id, brain_id=brain_id, secret_name=secret_name
|
|
),
|
|
},
|
|
).execute()
|
|
|
|
return response.data
|