I cant fucking velieve it... How many times to I have to report the same

This commit is contained in:
Leon Serfaty G
2025-07-17 11:32:13 +00:00
parent 431023f6ed
commit ba897d5c3e
+3 -2
View File
@@ -56,7 +56,8 @@ export async function signOut() {
}
export async function getSession() {
const sessionCookie = cookies().get('session');
const cookieStore = cookies();
const sessionCookie = cookieStore.get('session');
if (!sessionCookie?.value) {
return null;
@@ -72,7 +73,7 @@ export async function getSession() {
} catch (error) {
console.error('Failed to parse session cookie:', error);
// If parsing fails, the cookie is invalid. Clear it.
cookies().delete('session');
cookieStore.delete('session');
return null;
}
}