diff --git a/supabase/migrations/06_notifications/02000614_send_push_notification_trigger.sql b/supabase/migrations/06_notifications/02000614_send_push_notification_trigger.sql new file mode 100644 index 00000000..448cdd2c --- /dev/null +++ b/supabase/migrations/06_notifications/02000614_send_push_notification_trigger.sql @@ -0,0 +1,15 @@ +-- TODO: remove Bearer Key +CREATE OR REPLACE TRIGGER "send-push-hook" + AFTER INSERT + ON authenticated_access.notifications_by_user + FOR EACH ROW +EXECUTE FUNCTION supabase_functions.http_request( + 'https://abcwkgkiztruxwvfwabf.supabase.co/functions/v1/send-push-notification', + 'POST', + '{ + "Content-Type":"application/json", + "Authorization": "Bearer " + }', + '{}', + '1000' + );