10 lines
272 B
TypeScript
10 lines
272 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { cookies } from "next/headers";
|
|
|
|
export async function GET() {
|
|
const cookieStore = cookies();
|
|
const credential = JSON.parse(cookieStore.get("credential")?.value || "");
|
|
|
|
|
|
return NextResponse.json({ credential });
|
|
} |