Skip to content

Commit 872f212

Browse files
committed
fix: await cookies() for session retrieval
1 parent a1fd10e commit 872f212

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • refine-nextjs/plugins/data-provider-appwrite/src/utils/appwrite

refine-nextjs/plugins/data-provider-appwrite/src/utils/appwrite/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { APPWRITE_JWT_KEY, APPWRITE_PROJECT, APPWRITE_URL } from '@utils/constan
55
export const getSessionClient = async () => {
66
const client = new Client().setEndpoint(APPWRITE_URL).setProject(APPWRITE_PROJECT)
77

8-
const session = cookies().get(APPWRITE_JWT_KEY)
8+
const session = (await cookies()).get(APPWRITE_JWT_KEY)
99
if (!session || !session.value) {
1010
throw new Error('No session')
1111
}

0 commit comments

Comments
 (0)