feedback fix

This commit is contained in:
Danel Kungla
2025-09-23 14:33:48 +03:00
parent 4962ba8ec2
commit 4afc498cd7
2 changed files with 13 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ export default async function Recommendations({
analysisRecommendations.includes(analysis.title),
);
if (orderAnalyses.length < 1) {
if (orderAnalyses.length === 0) {
return null;
}

View File

@@ -1,7 +1,17 @@
ALTER TABLE medreport.ai_responses ENABLE ROW LEVEL SECURITY;
CREATE POLICY "ai_responses_select" ON medreport.ai_responses FOR SELECT TO authenticated USING (true);
CREATE POLICY "ai_responses_insert" ON medreport.ai_responses FOR INSERT TO authenticated WITH CHECK (true);
create policy "ai_responses_select"
on medreport.ai_responses
for select
to authenticated
using (account_id = auth.uid());
create policy "ai_responses_insert"
on medreport.ai_responses
for insert
to authenticated
with check (account_id = auth.uid());
grant select, insert, update, delete on table medreport.ai_responses to authenticated;
@@ -56,4 +66,3 @@ as $$
$$;
grant execute on function medreport.get_latest_analysis_response_elements_for_current_user(uuid) to authenticated, service_role;