fix: 修复多品牌架构回归类型与校验问题
This commit is contained in:
1 parent
4902a564f0
commit
e2409c0848
6 files changed
+16
-15
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { BadRequestException, Controller, Get, NotFoundException, Query } from "@nestjs/common";
|
||||
import { Controller, Get, NotFoundException, Query } from "@nestjs/common";
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { PrismaService } from "../../prisma.service.js";
|
||||
import {
|
||||
@@ -173,7 +173,7 @@ export class PublicWorkspaceController {
|
||||
const inquiryForm = inquiryForms[0] ?? null;
|
||||
const runtimeWorkspace: RuntimeWorkspace = {
|
||||
schemaVersion: "1.0.0",
|
||||
brand: (brand ?? {}) as Record<string, unknown>,
|
||||
brand: brand ?? {},
|
||||
navigation: {
|
||||
tabs: [
|
||||
{ key: "home", label: "首页", page: "pages/index/index" },
|
||||
@@ -242,7 +242,7 @@ export class PublicWorkspaceController {
|
||||
: {};
|
||||
}
|
||||
private jsonArray(value: unknown): Prisma.JsonValue[] {
|
||||
return Array.isArray(value) ? value : [];
|
||||
return Array.isArray(value) ? (value as Prisma.JsonValue[]) : [];
|
||||
}
|
||||
private moduleType(value: string): RuntimeModule["type"] {
|
||||
const known: RuntimeModule["type"][] = [
|
||||
|
||||
Reference in new issue
Block a user