mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 04:40:46 -05:00
19 lines
321 B
TypeScript
19 lines
321 B
TypeScript
import { sql } from "~/db/sql";
|
|
|
|
const stm = sql.prepare(/* sql */ `
|
|
update "AllTeamMember"
|
|
set "leftAt" = strftime('%s', 'now')
|
|
where "teamId" = @teamId
|
|
and "userId" = @userId
|
|
`);
|
|
|
|
export function leaveTeam({
|
|
teamId,
|
|
userId,
|
|
}: {
|
|
teamId: number;
|
|
userId: number;
|
|
}) {
|
|
stm.run({ teamId, userId });
|
|
}
|