File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ const invitesRedirector = async (currentUrl: string) => {
4848
4949 const invites = res . data . rows || [ ] ;
5050
51- if ( invites . length > 0 && ! currentUrl . includes ( '/onboarding' ) ) {
51+ if ( invites . length > 0 && ! currentUrl . includes ( '/onboarding/invites ' ) ) {
5252 throw redirect ( '/onboarding/invites' ) ;
5353 }
5454
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ func (r *tenantInviteRepository) ListTenantInvitesByEmail(email string) ([]db.Te
4545 return r .client .TenantInviteLink .FindMany (
4646 db .TenantInviteLink .InviteeEmail .Equals (email ),
4747 db .TenantInviteLink .Status .Equals (db .InviteLinkStatusPending ),
48+ db .TenantInviteLink .Expires .Gt (time .Now ()),
4849 ).With (
4950 db .TenantInviteLink .Tenant .Fetch (),
5051 ).Exec (context .Background ())
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ type TenantInviteRepository interface {
4242 // GetTenantInvite returns the tenant invite with the given id
4343 GetTenantInvite (id string ) (* db.TenantInviteLinkModel , error )
4444
45- // ListTenantInvitesByEmail returns the list of tenant invites for the given invitee email
45+ // ListTenantInvitesByEmail returns the list of tenant invites for the given invitee email for invites
46+ // which are not expired
4647 ListTenantInvitesByEmail (email string ) ([]db.TenantInviteLinkModel , error )
4748
4849 // ListTenantInvitesByTenantId returns the list of tenant invites for the given tenant id
You can’t perform that action at this time.
0 commit comments