Compare commits

..

2 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
5542ee52f7 Fix Supabase OR filter syntax 2025-11-04 00:15:18 +00:00
gpt-engineer-app[bot]
bf5dbc80b6 Fix: Update validation schema 2025-11-04 00:10:15 +00:00
2 changed files with 3 additions and 2 deletions

View File

@@ -324,6 +324,7 @@ export const useModerationQueue = (config?: UseModerationQueueConfig) => {
.single();
const expiresAt = new Date(Date.now() + 15 * 60 * 1000);
const now = new Date().toISOString();
const { error } = await supabase
.from('content_submissions')
@@ -333,7 +334,7 @@ export const useModerationQueue = (config?: UseModerationQueueConfig) => {
locked_until: expiresAt.toISOString(),
})
.eq('id', submissionId)
.or(`assigned_to.is.null,locked_until.lt.${new Date().toISOString()}`); // Only if unclaimed or lock expired
.or(`assigned_to.is.null,locked_until.lt."${now}"`); // Only if unclaimed or lock expired
if (error) throw error;

View File

@@ -72,7 +72,7 @@ export const ModerationItemSchema = z.object({
user_profile: LegacyProfileSchema.optional().nullable(),
// Submission items
submission_items: z.array(SubmissionItemSchema).optional(),
submission_items: z.array(SubmissionItemSchema).optional().nullable(),
// Entity names
entity_name: z.string().optional(),