feat: 接入配置驱动的动态咨询表单
This commit is contained in:
1 parent
8872316ad3
commit
02966cf65c
9 files changed
+232
-3
No files matched your search
@@ -134,7 +134,7 @@ export class PublicWorkspaceController {
|
||||
@Get()
|
||||
async get(): Promise<unknown> {
|
||||
const brandId = process.env.DEFAULT_BRAND_ID ?? "00000000-0000-0000-0000-000000000001";
|
||||
const [brand, modules, fields, offerings] = await Promise.all([
|
||||
const [brand, modules, fields, offerings, inquiryForm] = await Promise.all([
|
||||
this.prisma.brandProfile.findUnique({ where: { id: brandId } }),
|
||||
this.prisma.brandModule.findMany({
|
||||
where: { brandId, isEnabled: true },
|
||||
@@ -148,8 +148,12 @@ export class PublicWorkspaceController {
|
||||
where: { brandId, isEnabled: true },
|
||||
orderBy: { sortOrder: "asc" },
|
||||
}),
|
||||
this.prisma.inquiryForm.findFirst({
|
||||
where: { brandId, isEnabled: true },
|
||||
orderBy: { updatedAt: "desc" },
|
||||
}),
|
||||
]);
|
||||
return { brand, modules, fields, offerings };
|
||||
return { brand, modules, fields, offerings, inquiryForm };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user