fix(scheduler): use equals: null filter for endDate to satisfy Prisma where syntax and stop log spam
This commit is contained in:
@@ -317,6 +317,7 @@ model MatchingRun {
|
|||||||
|
|
||||||
// Relations
|
// Relations
|
||||||
event Event @relation(fields: [eventId], references: [id], onDelete: Cascade)
|
event Event @relation(fields: [eventId], references: [id], onDelete: Cascade)
|
||||||
|
suggestions RecordingSuggestion[]
|
||||||
|
|
||||||
@@index([eventId, startedAt])
|
@@index([eventId, startedAt])
|
||||||
@@map("matching_runs")
|
@@map("matching_runs")
|
||||||
|
|||||||
@@ -87,6 +87,11 @@ if (securityConfig.csrf.enabled) {
|
|||||||
}
|
}
|
||||||
next(err);
|
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
|
// Request logging middleware
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ async function listCandidateEvents() {
|
|||||||
// Include events that end today or in the future
|
// Include events that end today or in the future
|
||||||
OR: [
|
OR: [
|
||||||
{ endDate: { gte: now } },
|
{ endDate: { gte: now } },
|
||||||
{ endDate: null },
|
{ endDate: { equals: null } },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState, Fragment } from 'react';
|
||||||
import { adminAPI } from '../../services/api';
|
import { adminAPI } from '../../services/api';
|
||||||
import { RefreshCcw, Play, ChevronDown, ChevronRight } from 'lucide-react';
|
import { RefreshCcw, Play, ChevronDown, ChevronRight } from 'lucide-react';
|
||||||
|
|
||||||
@@ -117,8 +117,8 @@ export default function MatchingRunsSection({ slug }) {
|
|||||||
</tr>
|
</tr>
|
||||||
) : (
|
) : (
|
||||||
runs.map((run) => (
|
runs.map((run) => (
|
||||||
<>
|
<Fragment key={run.id}>
|
||||||
<tr key={run.id} id={`run-${run.id}`}>
|
<tr id={`run-${run.id}`}>
|
||||||
<td className="px-3 py-2 text-sm text-gray-700">
|
<td className="px-3 py-2 text-sm text-gray-700">
|
||||||
<button
|
<button
|
||||||
onClick={() => toggleViewPairs(run.id)}
|
onClick={() => toggleViewPairs(run.id)}
|
||||||
@@ -173,7 +173,7 @@ export default function MatchingRunsSection({ slug }) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)}
|
)}
|
||||||
</>
|
</Fragment>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user