Fix: Type safety and unit validation

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 15:05:50 +00:00
parent bcba0a4f0c
commit 65a6ed1acb
10 changed files with 146 additions and 32 deletions

View File

@@ -107,8 +107,8 @@ interface RequestMetadata {
}
async function logRequestMetadata(metadata: RequestMetadata): Promise<void> {
// Type assertion needed until Supabase types regenerate after migration
const { error } = await supabase.rpc('log_request_metadata' as any, {
// Safe cast - RPC function exists in database
const { error } = await supabase.rpc('log_request_metadata' as 'log_request_metadata', {
p_request_id: metadata.requestId,
p_user_id: metadata.userId || null,
p_endpoint: metadata.endpoint,