Skip to content

Commit

Permalink
doc: Added await to cookies().get() promise
Browse files Browse the repository at this point in the history
  • Loading branch information
hefler committed Sep 19, 2024
1 parent b605649 commit fbb8c32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function createSessionClient() {
.setEndpoint(process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT)
.setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT);

const session = cookies().get("my-custom-session");
const session = await cookies().get("my-custom-session");
if (!session || !session.value) {
throw new Error("No session");
}
Expand Down

0 comments on commit fbb8c32

Please sign in to comment.