Skip to content

Commit 119e4d6

Browse files
committed
fix cookies
1 parent 20736bc commit 119e4d6

File tree

1 file changed

+1
-1
lines changed
  • examples/app-router/app/methods/post/cookies

1 file changed

+1
-1
lines changed

examples/app-router/app/methods/post/cookies/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export async function POST(request: Request) {
44
const formData = await request.formData();
55
const username = formData.get("username");
66
const password = formData.get("password");
7-
(await cookies()).set("auth_session", "SUPER_SECRET_SESSION_ID_1234");
87
if (username === "hakuna" && password === "matata") {
8+
(await cookies()).set("auth_session", "SUPER_SECRET_SESSION_ID_1234");
99
return Response.json(
1010
{
1111
message: "ok",

0 commit comments

Comments
 (0)