chore: generate
This commit is contained in:
parent
ac76af8c56
commit
9559e2425b
2 changed files with 26 additions and 96 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue