|
@@ -61,8 +61,6 @@ const app = new OpenAPIHono<AuthContext>().openapi(createUploadPolicyRoute, asyn
|
|
|
try {
|
|
try {
|
|
|
const data = await c.req.json();
|
|
const data = await c.req.json();
|
|
|
const user = c.get('user');
|
|
const user = c.get('user');
|
|
|
-
|
|
|
|
|
- console.debug('user', user)
|
|
|
|
|
|
|
|
|
|
// 创建文件服务实例
|
|
// 创建文件服务实例
|
|
|
const fileService = new FileService(AppDataSource);
|
|
const fileService = new FileService(AppDataSource);
|
|
@@ -74,7 +72,6 @@ const app = new OpenAPIHono<AuthContext>().openapi(createUploadPolicyRoute, asyn
|
|
|
uploadTime: new Date()
|
|
uploadTime: new Date()
|
|
|
};
|
|
};
|
|
|
const result = await fileService.createFile(fileData);
|
|
const result = await fileService.createFile(fileData);
|
|
|
- console.debug('result', result)
|
|
|
|
|
const typedResult = await parseWithAwait(CreateFileResponseSchema, result);
|
|
const typedResult = await parseWithAwait(CreateFileResponseSchema, result);
|
|
|
return c.json(typedResult, 200);
|
|
return c.json(typedResult, 200);
|
|
|
} catch (error) {
|
|
} catch (error) {
|