mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 04:02:40 -05:00
15 lines
351 B
TypeScript
15 lines
351 B
TypeScript
import { sql } from "~/db/sql";
|
|
import type { Tables } from "~/db/tables";
|
|
|
|
const stm = sql.prepare(/*sql*/ `
|
|
select 1
|
|
from "TournamentStage"
|
|
where "TournamentStage"."tournamentId" = @tournamentId
|
|
`);
|
|
|
|
export default function hasTournamentStarted(
|
|
tournamentId: Tables["Tournament"]["id"],
|
|
) {
|
|
return Boolean(stm.get({ tournamentId }));
|
|
}
|