mirror of
https://github.com/hanzo-apps/dataroom.git
synced 2026-10-30 14:47:36 +00:00
22 lines
593 B
TypeScript
22 lines
593 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
import { getFeatureFlags } from "@/lib/featureFlags";
|
|
|
|
export const runtime = "edge";
|
|
|
|
export async function GET(request: Request) {
|
|
const { searchParams } = new URL(request.url);
|
|
const teamId = searchParams.get("teamId");
|
|
|
|
try {
|
|
const features = await getFeatureFlags({ teamId: teamId || undefined });
|
|
return NextResponse.json(features);
|
|
} catch (error) {
|
|
console.error("Error fetching feature flags:", error);
|
|
return NextResponse.json(
|
|
{ error: "Failed to fetch feature flags" },
|
|
{ status: 500 },
|
|
);
|
|
}
|
|
}
|