I cant fucking velieve it... How many times to I have to report the same
This commit is contained in:
+4
-3
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user