Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions app/api/bootstrap/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ interface BootstrapResponse {
export async function GET(req: NextRequest): Promise<NextResponse> {
const projectId = req.nextUrl.searchParams.get('projectId')?.trim();
if (!projectId) {
return NextResponse.json({ error: 'projectId is required' }, { status: 400 });
return NextResponse.json(
{ error: 'projectId is required' },
{ status: 400 },
);
}

const warnings: string[] = [];
Expand All @@ -57,7 +60,9 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
// 1) Brand + auth — public, no key needed. Failure is non-fatal.
try {
const client = serviceClientForProject(projectId);
const config = await client.api.public.getPublicProjectConfig({ projectId });
const config = await client.api.public.getPublicProjectConfig({
projectId,
});
out.branding = config.branding ?? null;
out.auth = config.auth ?? null;
} catch {
Expand All @@ -84,8 +89,7 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
// (NotificationSettings). We return only the catalog, never any user's
// values.
const projectResp = await client.hub.account.getProject({ projectId });
out.marketingPreferences =
projectResp.item?.notificationSettings ?? null;
out.marketingPreferences = projectResp.item?.notificationSettings ?? null;
} catch {
warnings.push('preferences-unavailable');
}
Expand Down
5 changes: 4 additions & 1 deletion app/api/structure/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ import type {
export const runtime = 'nodejs';
export const dynamic = 'force-dynamic';

const HUB_BASE = (process.env.HUB_BASE_URL ?? NORBIX_HUB_URL).replace(/\/$/, '');
const HUB_BASE = (process.env.HUB_BASE_URL ?? NORBIX_HUB_URL).replace(
/\/$/,
'',
);
const HUB_VERSION = process.env.HUB_VERSION ?? 'v3';
const API_KEY = process.env.API_KEY;
const NORBIX_ENV =
Expand Down
Loading
Loading