quivr/backend/repository/brain/delete_brain_user.py
Mamadou DICKO 1643b54b7b
feat: allow user to unsubscribe from a brain (#1254)
* feat: update translations

* feat: add <DeleteOrUnsubscribeConfirmationModal />

* test(DeleteOrUnsubscribeConfirmationModal): update tests

* feat: redirect to /brains-management on invalid brain id

* refactor: move delete_brain_user to delete_brain_users

* feat: add /POST '/brains/{brain_id}/subscribe'

* feat: handle public brain unsubscription
2023-09-25 14:22:59 +02:00

12 lines
266 B
Python

from uuid import UUID
from models.settings import get_supabase_db
def delete_brain_user(user_id: UUID, brain_id: UUID) -> None:
supabase_db = get_supabase_db()
supabase_db.delete_brain_user_by_id(
user_id=user_id,
brain_id=brain_id,
)