mirror of
https://github.com/PeterMaquiran/tvone.git
synced 2026-04-20 12:46:06 +00:00
16 lines
312 B
TypeScript
16 lines
312 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
export async function POST(req: Request) {
|
|
const { token } = await req.json();
|
|
|
|
const res = NextResponse.json({ ok: true });
|
|
|
|
res.cookies.set("auth_token", token, {
|
|
httpOnly: true,
|
|
secure: true,
|
|
sameSite: "lax",
|
|
path: "/",
|
|
});
|
|
|
|
return res;
|
|
} |