From e04d1bf7bfcd9eaeae505bccee1a81ad0ed22357 Mon Sep 17 00:00:00 2001 From: bytedream Date: Tue, 10 Jun 2025 20:24:24 +0200 Subject: [PATCH] fix strike query --- src/db/schema/strike.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/db/schema/strike.ts b/src/db/schema/strike.ts index 7884bcb..14df30e 100644 --- a/src/db/schema/strike.ts +++ b/src/db/schema/strike.ts @@ -3,7 +3,6 @@ import { strikeReason } from '@db/schema/strikeReason.ts'; import type { MySql2Database } from 'drizzle-orm/mysql2'; import { eq } from 'drizzle-orm'; import { report } from '@db/schema/report.ts'; -import { reportStatus } from '@db/schema/reportStatus.ts'; type Database = MySql2Database<{ strike: typeof strike }>; @@ -52,6 +51,6 @@ export async function getStrikesByTeamId(db: Database, values: GetStrikesByTeamI }) .from(strike) .innerJoin(strikeReason, eq(strike.strikeReasonId, strikeReason.id)) - .innerJoin(report, eq(reportStatus.reportId, report.id)) + .innerJoin(report, eq(strike.reportId, report.id)) .where(eq(report.reportedTeamId, values.teamId)); }