Update Next.js version and fix invite expiration check
This commit increments the Next.js version to 14.2.0-canary.48 and updates the related dependencies' versions in the lock file as well. Additionally, it corrects the invitation expiration check on the join page. Previously, it was checking for a date less than the current time which caused it to invalidate valid tokens; now, it correctly checks for dates greater than or equal to the current time.
This commit is contained in:
@@ -134,7 +134,7 @@ async function getInviteDataFromInviteToken(token: string) {
|
||||
'id, expires_at, account: account_id !inner (id, name, slug, picture_url)',
|
||||
)
|
||||
.eq('invite_token', token)
|
||||
.rangeLt('expires_at', new Date().toISOString())
|
||||
.gte('expires_at', new Date().toISOString())
|
||||
.single();
|
||||
|
||||
console.log(invitation, error);
|
||||
|
||||
Reference in New Issue
Block a user