import { auth } from "@clerk/nextjs/server"; import { generateShortCode } from "@/lib/auth"; export async function PUT(req: Request) { const { userId, orgId } = await auth(); if (!userId || !orgId) { return new Response("Unauthorized", { status: 401 }); } const { displayId } = await req.json(); const code = await generateShortCode(displayId); return Response.json({ code }); }