Files
ocs-portal-web/app/api/cookies/route.ts
2025-04-15 13:56:54 +07:00

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 });
}