feat
Deskripsi: - Create validasi - Create register - create global prisma, color tune,dan global state
This commit is contained in:
12
src/app/api/user/get-token/route.ts
Normal file
12
src/app/api/user/get-token/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { unsealData } from 'iron-session';
|
||||
import { cookies } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET() {
|
||||
const c = cookies().get("ssn");
|
||||
const data = JSON.parse(
|
||||
await unsealData(c?.value as string, {password: process.env.PWD as string})
|
||||
)
|
||||
|
||||
return NextResponse.json(data);
|
||||
}
|
||||
Reference in New Issue
Block a user