chore: 清理类型检查与控制器无效依赖
This commit is contained in:
1 parent
6edb9d7a30
commit
6f2cc51985
4 files changed
+6
-25
No files matched your search
@@ -9,5 +9,5 @@
|
||||
"moduleResolution": "Bundler",
|
||||
"allowImportingTsExtensions": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
||||
}
|
||||
@@ -16,14 +16,6 @@ import type { FastifyRequest } from "fastify";
|
||||
import { PrismaService } from "./prisma.service.js";
|
||||
import { readIdentity } from "./auth.js";
|
||||
import {
|
||||
CreateServiceDto,
|
||||
CreateTagDto,
|
||||
CreateTrustContentDto,
|
||||
UpdateBookingStatusDto,
|
||||
UpdateBookingTagsDto,
|
||||
UpdateBrandDto,
|
||||
UpdateServiceDto,
|
||||
UpdateTrustContentDto,
|
||||
InstallTemplateDto,
|
||||
CreateOfferingDto,
|
||||
UpdateOfferingDto,
|
||||
@@ -33,9 +25,6 @@ import {
|
||||
CreateInquiryFormDto,
|
||||
UpdateInquiryFormDto,
|
||||
} from "./admin.dto.js";
|
||||
import { PrismaService as _PrismaService } from "./prisma.service.js";
|
||||
import { BookingService } from "./booking.service.js";
|
||||
import { getBrandTemplate } from "@personal-brand/config";
|
||||
import { TemplateWorkspaceService } from "./template-workspace.service.js";
|
||||
|
||||
@Controller("admin/workspace")
|
||||
|
||||
@@ -32,14 +32,6 @@ import {
|
||||
UpdateBrandDto,
|
||||
UpdateServiceDto,
|
||||
UpdateTrustContentDto,
|
||||
InstallTemplateDto,
|
||||
CreateOfferingDto,
|
||||
UpdateOfferingDto,
|
||||
UpdateModuleDto,
|
||||
CreateFieldDefinitionDto,
|
||||
UpdateFieldDefinitionDto,
|
||||
CreateInquiryFormDto,
|
||||
UpdateInquiryFormDto,
|
||||
} from "./admin.dto.js";
|
||||
import { AdminAuthService } from "./admin-auth.service.js";
|
||||
import { AdminLoginDto, WechatLoginDto } from "./admin-auth.dto.js";
|
||||
@@ -49,7 +41,7 @@ import type { TransformFnParams } from "class-transformer";
|
||||
import { IsBoolean, IsEnum, IsOptional, IsString } from "class-validator";
|
||||
import { readIdentity, signIdentity } from "./auth.js";
|
||||
import { ApiExceptionFilter, RequestIdMiddleware } from "./http.js";
|
||||
import { brandTemplates, getBrandTemplate } from "@personal-brand/config";
|
||||
import { getBrandTemplate } from "@personal-brand/config";
|
||||
import { AdminWorkspaceController } from "./admin-workspace.controller.js";
|
||||
import { TemplateWorkspaceService } from "./template-workspace.service.js";
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export class TemplateWorkspaceService {
|
||||
brandId,
|
||||
templateKey,
|
||||
templateVersion: template.version,
|
||||
configSnapshot: template as unknown as Prisma.InputJsonValue,
|
||||
configSnapshot: template,
|
||||
},
|
||||
});
|
||||
await tx.brandModule.createMany({
|
||||
@@ -129,7 +129,7 @@ export class TemplateWorkspaceService {
|
||||
previousSnapshots: [
|
||||
...history,
|
||||
installation.configSnapshot,
|
||||
] as unknown as Prisma.InputJsonValue,
|
||||
],
|
||||
},
|
||||
});
|
||||
return { installation: updated, addedModules, addedFields };
|
||||
@@ -149,8 +149,8 @@ export class TemplateWorkspaceService {
|
||||
where: { id: installation.id },
|
||||
data: {
|
||||
templateVersion: version,
|
||||
configSnapshot: previous as Prisma.InputJsonValue,
|
||||
previousSnapshots: history.slice(0, -1) as Prisma.InputJsonValue,
|
||||
configSnapshot: previous,
|
||||
previousSnapshots: history.slice(0, -1),
|
||||
},
|
||||
});
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user