mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 10:11:12 -05:00
Fix TypeScript errors in moderation components
This commit is contained in:
@@ -172,9 +172,18 @@ export async function updateSubmissionItem(
|
||||
itemId: string,
|
||||
updates: Partial<SubmissionItemWithDeps>
|
||||
): Promise<void> {
|
||||
// Cast unknown to Json for Supabase compatibility
|
||||
const supabaseUpdates = {
|
||||
...updates,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
item_data: updates.item_data !== undefined ? updates.item_data as any : undefined,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
original_data: updates.original_data !== undefined ? updates.original_data as any : undefined,
|
||||
};
|
||||
|
||||
const { error } = await supabase
|
||||
.from('submission_items')
|
||||
.update(updates)
|
||||
.update(supabaseUpdates)
|
||||
.eq('id', itemId);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
Reference in New Issue
Block a user