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), ))