Your Name 27d44b3b77
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
feat: add configurable 3d model display aliases
2026-04-08 22:09:43 +08:00

24 lines
680 B
TypeScript

import { NextResponse } from "next/server";
import { getThreeDModelAliasConfigForRuntime } from "@/lib/model3d/model-alias-config-server";
import { toPublicThreeDModelAliasConfig } from "@/lib/model3d/model-alias-config";
export async function GET() {
try {
const config = await getThreeDModelAliasConfigForRuntime();
return NextResponse.json({
success: true,
data: toPublicThreeDModelAliasConfig(config),
});
} catch (error) {
console.error("[ThreeDModelAliases] GET failed:", error);
return NextResponse.json(
{
success: false,
error: "获取 3D 模型显示映射失败",
},
{ status: 500 },
);
}
}