diff --git a/backend/prisma/schema.prisma b/backend/prisma/schema.prisma index e759e9a..5df5ac4 100644 --- a/backend/prisma/schema.prisma +++ b/backend/prisma/schema.prisma @@ -317,6 +317,7 @@ model MatchingRun { // Relations event Event @relation(fields: [eventId], references: [id], onDelete: Cascade) + suggestions RecordingSuggestion[] @@index([eventId, startedAt]) @@map("matching_runs") diff --git a/backend/src/app.js b/backend/src/app.js index 03a57d9..715fb5d 100644 --- a/backend/src/app.js +++ b/backend/src/app.js @@ -87,6 +87,11 @@ if (securityConfig.csrf.enabled) { } next(err); }); +} else { + // Provide a harmless CSRF endpoint in development when CSRF is disabled + app.get('/api/csrf-token', (req, res) => { + res.json({ csrfToken: null, disabled: true }); + }); } // Request logging middleware diff --git a/backend/src/services/scheduler.js b/backend/src/services/scheduler.js index 2ec8e37..50115ce 100644 --- a/backend/src/services/scheduler.js +++ b/backend/src/services/scheduler.js @@ -22,7 +22,7 @@ async function listCandidateEvents() { // Include events that end today or in the future OR: [ { endDate: { gte: now } }, - { endDate: null }, + { endDate: { equals: null } }, ], }, select: { diff --git a/frontend/src/components/events/MatchingRunsSection.jsx b/frontend/src/components/events/MatchingRunsSection.jsx index 6c6e6bb..f89a874 100644 --- a/frontend/src/components/events/MatchingRunsSection.jsx +++ b/frontend/src/components/events/MatchingRunsSection.jsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from 'react'; +import { useEffect, useState, Fragment } from 'react'; import { adminAPI } from '../../services/api'; import { RefreshCcw, Play, ChevronDown, ChevronRight } from 'lucide-react'; @@ -117,8 +117,8 @@ export default function MatchingRunsSection({ slug }) { ) : ( runs.map((run) => ( - <> -