mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix typeorm issue
This commit is contained in:
parent
ac21e4e6c8
commit
477b5d7d24
2 changed files with 2 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ export class NewsletterEmail {
|
|||
user!: User
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
confirmationCode?: string
|
||||
confirmationCode?: string | null
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date
|
||||
|
|
|
|||
|
|
@ -106,9 +106,7 @@ const validateInvite = async (
|
|||
return false
|
||||
}
|
||||
const membershipRepo = entityManager.getRepository(GroupMembership)
|
||||
const numMembers = await membershipRepo.count({
|
||||
where: { invite: invite },
|
||||
})
|
||||
const numMembers = await membershipRepo.countBy({ invite: { id: invite.id } })
|
||||
if (numMembers >= invite.maxMembers) {
|
||||
console.log('rejecting invite, too many users', invite, numMembers)
|
||||
return false
|
||||
|
|
|
|||
Loading…
Reference in a new issue