mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 14:51:12 -05:00
Fix all compliance violations
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { logger } from './logger';
|
||||
|
||||
/**
|
||||
* Generate a URL-safe slug from a name
|
||||
@@ -50,7 +51,7 @@ export async function ensureUniqueSlug(
|
||||
const { data, error } = await query.limit(1);
|
||||
|
||||
if (error) {
|
||||
console.error(`Error checking slug uniqueness in ${tableName}:`, error);
|
||||
logger.error('Error checking slug uniqueness', { error, tableName });
|
||||
throw error;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import type { EntityType } from '@/types/versioning';
|
||||
import { createTableQuery } from './supabaseHelpers';
|
||||
import { logger } from './logger';
|
||||
|
||||
/**
|
||||
* Manually trigger cleanup of old versions for a specific entity type
|
||||
@@ -37,7 +38,7 @@ export async function cleanupVersions(
|
||||
});
|
||||
|
||||
if (error) {
|
||||
console.error('Version cleanup failed:', error);
|
||||
logger.error('Version cleanup failed', { error, entityType, keepCount });
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -97,7 +98,7 @@ export async function getVersionStats(
|
||||
const { data, error } = result;
|
||||
|
||||
if (error || !data) {
|
||||
console.error('Failed to fetch version stats:', error);
|
||||
logger.error('Failed to fetch version stats', { error, entityType, entityId });
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user