MED-88: add doctor email notifications (#65)
* MED-88: add doctor email notifications * add logging, send open jobs notification on partial analysis response * update permissions * fix import, permissions * casing, let email be null * unused import
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
grant select on table "medreport"."doctor_analysis_feedback" to "service_role";
|
||||
|
||||
create policy "service_role_select"
|
||||
on "medreport"."doctor_analysis_feedback"
|
||||
as permissive
|
||||
for select
|
||||
to service_role
|
||||
using (true);
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
create trigger "trigger_doctor_notification" after update
|
||||
on "medreport"."analysis_orders" for each row
|
||||
execute function "supabase_functions"."http_request"(
|
||||
'http://host.docker.internal:3000/api/db/webhook',
|
||||
'POST',
|
||||
'{"Content-Type":"application/json", "X-Supabase-Event-Signature":"WEBHOOKSECRET"}',
|
||||
'{}',
|
||||
'5000'
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
alter table audit.notification_entries enable row level security;
|
||||
|
||||
create policy "service_role_insert"
|
||||
on "audit"."notification_entries"
|
||||
as permissive
|
||||
for insert
|
||||
to service_role
|
||||
with check (true);
|
||||
|
||||
grant insert on table "audit"."notification_entries" to "service_role";
|
||||
Reference in New Issue
Block a user