Don't show passed days on events feed
This commit is contained in:
parent
8df681e520
commit
29ad1da6e2
@ -48,9 +48,9 @@ export async function loader({ context }: { context: RequestContext }) {
|
|||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const monthEventList = await context.env.D1.prepare(
|
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 = ? 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 = ? AND (day >= ? OR pending = 1) ORDER BY day ASC;",
|
||||||
)
|
)
|
||||||
.bind(now.getUTCMonth() + 1, now.getUTCFullYear())
|
.bind(now.getUTCMonth() + 1, now.getUTCFullYear(), now.getUTCDate())
|
||||||
.all();
|
.all();
|
||||||
|
|
||||||
if (monthEventList.error)
|
if (monthEventList.error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user