mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-28 06:27:06 -05:00
Compare commits
2 Commits
d4b137c340
...
5542ee52f7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5542ee52f7 | ||
|
|
bf5dbc80b6 |
@@ -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;
|
||||
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user