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",
|
"moduleResolution": "Bundler",
|
||||||
"allowImportingTsExtensions": true
|
"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 { PrismaService } from "./prisma.service.js";
|
||||||
import { readIdentity } from "./auth.js";
|
import { readIdentity } from "./auth.js";
|
||||||
import {
|
import {
|
||||||
CreateServiceDto,
|
|
||||||
CreateTagDto,
|
|
||||||
CreateTrustContentDto,
|
|
||||||
UpdateBookingStatusDto,
|
|
||||||
UpdateBookingTagsDto,
|
|
||||||
UpdateBrandDto,
|
|
||||||
UpdateServiceDto,
|
|
||||||
UpdateTrustContentDto,
|
|
||||||
InstallTemplateDto,
|
InstallTemplateDto,
|
||||||
CreateOfferingDto,
|
CreateOfferingDto,
|
||||||
UpdateOfferingDto,
|
UpdateOfferingDto,
|
||||||
@@ -33,9 +25,6 @@ import {
|
|||||||
CreateInquiryFormDto,
|
CreateInquiryFormDto,
|
||||||
UpdateInquiryFormDto,
|
UpdateInquiryFormDto,
|
||||||
} from "./admin.dto.js";
|
} 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";
|
import { TemplateWorkspaceService } from "./template-workspace.service.js";
|
||||||
|
|
||||||
@Controller("admin/workspace")
|
@Controller("admin/workspace")
|
||||||
|
|||||||
@@ -32,14 +32,6 @@ import {
|
|||||||
UpdateBrandDto,
|
UpdateBrandDto,
|
||||||
UpdateServiceDto,
|
UpdateServiceDto,
|
||||||
UpdateTrustContentDto,
|
UpdateTrustContentDto,
|
||||||
InstallTemplateDto,
|
|
||||||
CreateOfferingDto,
|
|
||||||
UpdateOfferingDto,
|
|
||||||
UpdateModuleDto,
|
|
||||||
CreateFieldDefinitionDto,
|
|
||||||
UpdateFieldDefinitionDto,
|
|
||||||
CreateInquiryFormDto,
|
|
||||||
UpdateInquiryFormDto,
|
|
||||||
} from "./admin.dto.js";
|
} from "./admin.dto.js";
|
||||||
import { AdminAuthService } from "./admin-auth.service.js";
|
import { AdminAuthService } from "./admin-auth.service.js";
|
||||||
import { AdminLoginDto, WechatLoginDto } from "./admin-auth.dto.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 { IsBoolean, IsEnum, IsOptional, IsString } from "class-validator";
|
||||||
import { readIdentity, signIdentity } from "./auth.js";
|
import { readIdentity, signIdentity } from "./auth.js";
|
||||||
import { ApiExceptionFilter, RequestIdMiddleware } from "./http.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 { AdminWorkspaceController } from "./admin-workspace.controller.js";
|
||||||
import { TemplateWorkspaceService } from "./template-workspace.service.js";
|
import { TemplateWorkspaceService } from "./template-workspace.service.js";
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export class TemplateWorkspaceService {
|
|||||||
brandId,
|
brandId,
|
||||||
templateKey,
|
templateKey,
|
||||||
templateVersion: template.version,
|
templateVersion: template.version,
|
||||||
configSnapshot: template as unknown as Prisma.InputJsonValue,
|
configSnapshot: template,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
await tx.brandModule.createMany({
|
await tx.brandModule.createMany({
|
||||||
@@ -129,7 +129,7 @@ export class TemplateWorkspaceService {
|
|||||||
previousSnapshots: [
|
previousSnapshots: [
|
||||||
...history,
|
...history,
|
||||||
installation.configSnapshot,
|
installation.configSnapshot,
|
||||||
] as unknown as Prisma.InputJsonValue,
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return { installation: updated, addedModules, addedFields };
|
return { installation: updated, addedModules, addedFields };
|
||||||
@@ -149,8 +149,8 @@ export class TemplateWorkspaceService {
|
|||||||
where: { id: installation.id },
|
where: { id: installation.id },
|
||||||
data: {
|
data: {
|
||||||
templateVersion: version,
|
templateVersion: version,
|
||||||
configSnapshot: previous as Prisma.InputJsonValue,
|
configSnapshot: previous,
|
||||||
previousSnapshots: history.slice(0, -1) as Prisma.InputJsonValue,
|
previousSnapshots: history.slice(0, -1),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in new issue
Block a user