Ver código fonte

fix: Prisma默认bookScale改为1000,订阅估算接口fallback统一

MyFramework User 3 meses atrás
pai
commit
4f5a6ee1f8

+ 1 - 1
server/prisma/schema.prisma

@@ -140,7 +140,7 @@ model Book {
   coverUrl       String?
   targetAudience String         @default("通用")
   style          String         @default("专业严谨")
-  bookScale      String         @default("130000")
+  bookScale      String         @default("1000")
   totalChapters  Int            @default(10)
   estimatedWords Int            @default(0)
   progress       Int            @default(0)

+ 1 - 1
server/src/modules/subscription/subscription.controller.ts

@@ -109,7 +109,7 @@ router.post('/check-quota', authMiddleware, async (ctx: Context) => {
 router.get('/book-scale-estimate', async (ctx: Context) => {
   const { scale } = ctx.query as { scale?: string };
   
-  const result = SubscriptionService.estimateBookWords(scale || '130000');
+  const result = SubscriptionService.estimateBookWords(scale || '1000');
   
   ctx.body = {
     code: 0,