gpt-engineer-app[bot] commited on
Commit
ce559c0
·
1 Parent(s): f839e97
Files changed (1) hide show
  1. src/server/incidents.functions.ts +2 -3
src/server/incidents.functions.ts CHANGED
@@ -61,10 +61,9 @@ const SYSTEM_PROMPT = `You are AVISYS, a multi-agent AI safety analyst for auton
61
  Be specific, technical, and concise. If input is sparse, infer plausible AV-domain causes but mark uncertainty. Always call submit_analysis with the structured result.`;
62
 
63
  export const analyzeIncident = createServerFn({ method: "POST" })
64
- .middleware([requireSupabaseAuth])
65
  .inputValidator((d: unknown) => InputSchema.parse(d))
66
- .handler(async ({ data, context }) => {
67
- const { supabase } = context;
68
  const apiKey = process.env.LOVABLE_API_KEY;
69
  if (!apiKey) throw new Error("LOVABLE_API_KEY not configured");
70
 
 
61
  Be specific, technical, and concise. If input is sparse, infer plausible AV-domain causes but mark uncertainty. Always call submit_analysis with the structured result.`;
62
 
63
  export const analyzeIncident = createServerFn({ method: "POST" })
 
64
  .inputValidator((d: unknown) => InputSchema.parse(d))
65
+ .handler(async ({ data }) => {
66
+ const supabase = supabaseAdmin;
67
  const apiKey = process.env.LOVABLE_API_KEY;
68
  if (!apiKey) throw new Error("LOVABLE_API_KEY not configured");
69