Skip to content

Commit

Permalink
Create 02000614_send_push_notification_trigger.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Donnerstagnacht authored Dec 31, 2023
1 parent 331ea82 commit 7720567
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 <service role key>"
}',
'{}',
'1000'
);

0 comments on commit 7720567

Please sign in to comment.