mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 12:44:47 -05:00
12 lines
252 B
TypeScript
12 lines
252 B
TypeScript
import { sql } from "~/db/sql";
|
|
|
|
const stm = sql.prepare(/* sql */ `
|
|
select "inviteCode"
|
|
from "Team"
|
|
where "id" = @teamId
|
|
`);
|
|
|
|
export function inviteCodeById(teamId: number): string | null {
|
|
return stm.get({ teamId })?.inviteCode ?? null;
|
|
}
|