Files
medreport_mrb2b/supabase/migrations/20250929144800_tto_booking_email_hook.sql
Danel Kungla 72f6f2b716 feat: create email template for TTO reservation confirmation
feat: implement order notifications service with TTO reservation confirmation handling

feat: create migration for TTO booking email webhook trigger
2025-09-30 16:05:43 +03:00

11 lines
406 B
SQL

create trigger tto_order_confirmation_email
after update on medreport.connected_online_reservation
for each row
when (old.status is distinct from new.status and new.status = 'CONFIRMED')
execute function supabase_functions.http_request(
'http://host.docker.internal:3000/api/db/webhook',
'POST',
'{"Content-Type":"application/json", "X-Supabase-Event-Signature":"WEBHOOKSECRET"}',
'{}',
'1000'
);