فهرست منبع

🐛 fix(documents): 修复preserveFormatting参数类型转换问题

- 使用z.coerce.boolean()确保preserveFormatting参数能正确从字符串转换为布尔值
- 解决非布尔类型输入导致的参数解析错误
yourname 2 ماه پیش
والد
کامیت
c3b2a58986
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/server/api/documents/merge/post.ts

+ 1 - 1
src/server/api/documents/merge/post.ts

@@ -16,7 +16,7 @@ const MergeRequestSchema = z.object({
     description: '输出格式',
     example: 'docx'
   }),
-  preserveFormatting: z.boolean().default(true).openapi({
+  preserveFormatting: z.coerce.boolean().default(true).openapi({
     description: '是否保持原有格式',
     example: true
   })