UNPKG

threed-garden

Version:

ThreeD Garden: WebGL 3D Environment Interface for Next.JS React TypeScript Three.JS React-Three Physics, 2D Paper.JS; APIs: Apollo GraphQL, WordPress; CSS: Tailwind, Radix-UI; Libraries: FarmBot 3D; AI: OpenAI, DeepSeek

21 lines (17 loc) 514 B
import { auth } from '#/lib/auth/auth' export const GET = auth((req) => { // const reqJSON = req.json() const res = Response.toString() if (req.auth) { return Response.json({ data: 'Protected data' }) // return Response // return req // return return JSON.parse(res) } return Response.json({ message: 'Not authenticated' }, { status: 401 }) // return Response // return req // return return JSON.parse(res) }) as any // TODO: Fix `auth()` return type