diff --git a/lib/data-utils.ts b/lib/data-utils.ts index 53e0210..91a17f6 100644 --- a/lib/data-utils.ts +++ b/lib/data-utils.ts @@ -183,7 +183,10 @@ export async function validateUserAndSession(userId: string, sessionId: string, throw new Error('Not Found'); } + const oneMonthFromToday = new Date(new Date().setUTCMonth(new Date().getUTCMonth() + 1)); + session.last_seen_at = new Date(); + session.expires_at = oneMonthFromToday; await updateSession(session);