Parcourir la source

💄 style(files): format code with consistent indentation

- adjust indentation of CreateFileResponseSchema to use 2 spaces consistently
- remove unnecessary blank lines between code blocks
yourname il y a 4 mois
Parent
commit
16eb8159fd
1 fichiers modifiés avec 15 ajouts et 15 suppressions
  1. 15 15
      src/server/api/files/upload-policy/post.ts

+ 15 - 15
src/server/api/files/upload-policy/post.ts

@@ -9,19 +9,19 @@ import { parseWithAwait } from '@/server/utils/parseWithAwait';
 
 
 const CreateFileResponseSchema = z.object({
-            file: FileSchema,
-            uploadPolicy: z.object({
-              'x-amz-algorithm': z.string(),
-              'x-amz-credential': z.string(),
-              'x-amz-date': z.string(),
-              'x-amz-security-token': z.string().optional(),
-              policy: z.string(),
-              'x-amz-signature': z.string(),
-              host: z.string(),
-              key: z.string(),
-              bucket: z.string()
-            })
-          });
+  file: FileSchema,
+  uploadPolicy: z.object({
+    'x-amz-algorithm': z.string(),
+    'x-amz-credential': z.string(),
+    'x-amz-date': z.string(),
+    'x-amz-security-token': z.string().optional(),
+    policy: z.string(),
+    'x-amz-signature': z.string(),
+    host: z.string(),
+    key: z.string(),
+    bucket: z.string()
+  })
+});
 
 // 创建文件上传策略路由
 const createUploadPolicyRoute = createRoute({
@@ -61,10 +61,10 @@ const app = new OpenAPIHono<AuthContext>().openapi(createUploadPolicyRoute, asyn
   try {
     const data = await c.req.json();
     const user = c.get('user');
-    
+
     // 创建文件服务实例
     const fileService = new FileService(AppDataSource);
-    
+
     // 添加用户ID到文件数据
     const fileData = {
       ...data,