From 3cb619d7fa4af2a6539e6d641ae045d5708a25ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 14 Jun 2026 21:26:25 +0200 Subject: [PATCH] fix: include today's completed matches in recentMatches lt(date, today) excluded same-day results once the live window closed. Changed to lte so finished matches from today appear on the homepage. Co-Authored-By: Claude Sonnet 4.6 --- lib/graphql/resolvers/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graphql/resolvers/index.ts b/lib/graphql/resolvers/index.ts index be0f372..71ab953 100644 --- a/lib/graphql/resolvers/index.ts +++ b/lib/graphql/resolvers/index.ts @@ -1,7 +1,7 @@ import { db } from '@/lib/db' import { tournaments, teams, matches, goals, groupStandings, stadiums, squads } from '@/lib/db/schema' import { slugify, getIso } from '@/lib/iso-codes' -import { eq, and, desc, asc, sql, ilike, or, isNotNull, lt, gt, gte } from 'drizzle-orm' +import { eq, and, desc, asc, sql, ilike, or, isNotNull, lt, lte, gt, gte } from 'drizzle-orm' function teamWithSlug(t: typeof teams.$inferSelect) { return { ...t, slug: slugify(t.name), iso2: t.iso2 ?? getIso(t.name) } @@ -116,7 +116,7 @@ export const resolvers = { const today = new Date().toISOString().slice(0, 10) const rows = await db.select().from(matches) .where(and( - lt(matches.date, today), + lte(matches.date, today), isNotNull(matches.scoreFtHome), eq(matches.isQualiPlayoff, false), ))