fix: replace any casts with typed casts for Supabase join results

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
This commit is contained in:
2026-07-11 07:52:53 +08:00
co-authored by Claude Sonnet 4.6
parent b281420810
commit ed14885253
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { NextResponse } from 'next/server'
import { createClient } from '@/lib/supabase/server'
import { validateIncidentInput } from '@/lib/incidents/validate'
import { validateIncidentInput, type IncidentType, type MedicalStatus } from '@/lib/incidents/validate'
import { uploadEvidenceFile, type EvidenceStage } from '@/lib/supabase/storage'
import { sendNewIncidentEmail } from '@/lib/notifications/email'
@@ -28,11 +28,11 @@ export async function POST(request: Request) {
const input = {
zone_token: body.zone_token as string,
incident_type: body.incident_type as any,
incident_type: body.incident_type as IncidentType,
description: body.description as string,
injury_involved: body.injury_involved === 'true' || body.injury_involved === true,
asset_involved: body.asset_involved === 'true' || body.asset_involved === true,
medical_status: body.medical_status as any || undefined,
medical_status: body.medical_status as MedicalStatus | undefined || undefined,
}
const validation = validateIncidentInput(input)