2023-08-03 10:53:38 +03:00
|
|
|
from uuid import UUID
|
|
|
|
|
2023-08-03 11:37:13 +03:00
|
|
|
from models.databases.supabase.prompts import DeletePromptResponse
|
2023-08-21 13:25:16 +03:00
|
|
|
from models import get_supabase_db
|
2023-08-03 10:53:38 +03:00
|
|
|
|
|
|
|
|
2023-08-03 11:37:13 +03:00
|
|
|
def delete_prompt_by_id(prompt_id: UUID) -> DeletePromptResponse:
|
2023-08-03 10:53:38 +03:00
|
|
|
"""
|
|
|
|
Delete a prompt by id
|
|
|
|
Args:
|
|
|
|
prompt_id (UUID): The id of the prompt
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
Prompt: The prompt
|
|
|
|
"""
|
2023-08-03 21:24:42 +03:00
|
|
|
supabase_db = get_supabase_db()
|
|
|
|
return supabase_db.delete_prompt_by_id(prompt_id)
|