chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-20 17:29:32 +00:00
parent ac76af8c56
commit 9559e2425b
2 changed files with 26 additions and 96 deletions

View File

@@ -294,12 +294,7 @@ export namespace Referral {
.select({ workspaceID: ReferralCodeTable.workspaceID })
.from(ReferralCodeTable)
.innerJoin(WorkspaceTable, eq(WorkspaceTable.id, ReferralCodeTable.workspaceID))
.where(
and(
eq(ReferralCodeTable.code, referralCode),
isNull(WorkspaceTable.timeDeleted),
),
)
.where(and(eq(ReferralCodeTable.code, referralCode), isNull(WorkspaceTable.timeDeleted)))
.then((rows) => rows[0])
if (!code) throw new Error("Referral code invalid")