13 lines
342 B
TypeScript
13 lines
342 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { auth } from "@/lib/auth";
|
|
import { PACKAGE_CATALOG } from "@/lib/packages";
|
|
|
|
export async function GET() {
|
|
const session = await auth();
|
|
if (!session?.user) {
|
|
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
|
}
|
|
|
|
return NextResponse.json(PACKAGE_CATALOG);
|
|
}
|