feat(MED-85): run force medipost results sync from Medusa BO

This commit is contained in:
2025-08-28 09:54:32 +03:00
parent a547503887
commit d760f86632
2 changed files with 16 additions and 0 deletions

View File

@@ -2072,6 +2072,8 @@ export type Database = {
}
Returns: number
}
sync_analysis_results: {
}
}
Enums: {
analysis_feedback_status: "STARTED" | "DRAFT" | "COMPLETED"

View File

@@ -0,0 +1,14 @@
CREATE OR REPLACE FUNCTION medreport.sync_analysis_results()
RETURNS void
LANGUAGE plpgsql
AS $$
BEGIN
select net.http_post(
url := 'https://test.medreport.ee/api/job/sync-analysis-results',
headers := jsonb_build_object(
'Content-Type', 'application/json',
'x-jobs-api-key', 'fd26ec26-70ed-11f0-9e95-431ac3b15a84'
)
) as request_id;
END;
$$;