fix strike query
All checks were successful
deploy / build-and-deploy (/testvaro, /opt/website-test, website-test) (push) Successful in 15s
deploy / build-and-deploy (/varo, /opt/website, website) (push) Successful in 23s

This commit is contained in:
2025-06-10 20:24:24 +02:00
parent 0a513d2350
commit e04d1bf7bf

View File

@ -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));
}