mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 04:40:46 -05:00
12 lines
261 B
TypeScript
12 lines
261 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 }) as any)?.inviteCode ?? null;
|
|
}
|