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:
giancarlo
2024-03-29 12:26:37 +08:00
parent d8ead74a1b
commit f1967a686c
4 changed files with 48 additions and 49 deletions

View File

@@ -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);