Fix: Add type field to submissions

This commit is contained in:
gpt-engineer-app[bot]
2025-10-15 14:31:21 +00:00
parent fd99eecfb4
commit ac3206625e

View File

@@ -234,10 +234,16 @@ export async function fetchSubmissions(
throw submissionsError; throw submissionsError;
} }
return { // Enrich submissions with type field for UI conditional logic
submissions: submissions || [], const enrichedSubmissions = (submissions || []).map(sub => ({
totalCount: count || 0, ...sub,
}; type: 'content_submission' as const,
}));
return {
submissions: enrichedSubmissions,
totalCount: count || 0,
};
} catch (error) { } catch (error) {
console.error('Error fetching submissions:', error); console.error('Error fetching submissions:', error);
return { return {