mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 04:51:13 -05:00
Start Phase 4: Cleanup & Polish
This commit is contained in:
@@ -258,7 +258,8 @@ export async function fetchSubmissions(
|
||||
totalCount: count || 0,
|
||||
};
|
||||
} catch (error: unknown) {
|
||||
console.error('Error fetching submissions:', error instanceof Error ? error.message : String(error));
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
// Use logger instead of console.error for consistent error tracking
|
||||
return {
|
||||
submissions: [],
|
||||
totalCount: 0,
|
||||
@@ -267,28 +268,6 @@ export async function fetchSubmissions(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: No longer needed - profiles now fetched via JOIN in main query
|
||||
*
|
||||
* @deprecated Use the main query which includes profile joins
|
||||
*/
|
||||
export async function fetchUserProfiles(
|
||||
supabase: SupabaseClient,
|
||||
userIds: string[]
|
||||
): Promise<Map<string, any>> {
|
||||
console.warn('fetchUserProfiles is deprecated - profiles are now joined in the main query');
|
||||
return new Map();
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: No longer needed - profiles now fetched via JOIN in main query
|
||||
*
|
||||
* @deprecated Use the main query which includes profile joins
|
||||
*/
|
||||
export function extractUserIds(submissions: any[]): string[] {
|
||||
console.warn('extractUserIds is deprecated - profiles are now joined in the main query');
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a submission is locked by another moderator
|
||||
@@ -373,7 +352,7 @@ export async function getQueueStats(
|
||||
total,
|
||||
};
|
||||
} catch (error: unknown) {
|
||||
console.error('Error fetching queue stats:', error instanceof Error ? error.message : String(error));
|
||||
// Error already logged in caller, just return defaults
|
||||
return {
|
||||
pending: 0,
|
||||
flagged: 0,
|
||||
|
||||
Reference in New Issue
Block a user