Return full month again in query

This commit is contained in:
Regalijan 2024-04-05 10:14:47 -04:00
parent cd35c04730
commit 50c040987d
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -51,9 +51,9 @@ export async function loader({ context }: { context: RequestContext }) {
const now = new Date();
const monthEventList = await context.env.D1.prepare(
"SELECT answer, approved, created_by, day, details, id, month, pending, performed_at, reached_minimum_player_count, type, year FROM events WHERE month = ? AND year = ? AND (day >= ? OR pending = 1) ORDER BY day ASC;",
"SELECT answer, approved, created_by, day, details, id, month, pending, performed_at, reached_minimum_player_count, type, year FROM events WHERE month = ? AND year = ? ORDER BY day ASC;",
)
.bind(now.getUTCMonth() + 1, now.getUTCFullYear(), now.getUTCDate())
.bind(now.getUTCMonth() + 1, now.getUTCFullYear())
.all();
if (monthEventList.error)