mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
11 lines
228 B
TypeScript
11 lines
228 B
TypeScript
import { cookies } from 'next/headers'
|
|
|
|
export const GET = async function() {
|
|
(await cookies()).get('token')
|
|
}
|
|
|
|
export async function POST(req: Request) {
|
|
if (req.method === 'POST') {
|
|
(await cookies()).get('token')
|
|
}
|
|
} |