feat(webui): add NLE comments export and migrate export API to POST (#401)

This commit is contained in:
Yiling-J
2026-09-13 16:29:58 +08:00
committed by GitHub
parent 3420d848cb
commit c5b57ca862
7 changed files with 468 additions and 22 deletions
+4 -4
View File
@@ -17,7 +17,7 @@ import {
uploadFileRequestSchema,
getDownloadLinksRequestSchema,
completeCommentRequestSchema,
exportCommentsQuerySchema,
exportCommentsRequestSchema,
AuditAction,
} from '@shumai/dtos'
import { transcodeService, buildContentDisposition } from '@shumai/core'
@@ -228,13 +228,13 @@ const route = new Hono<{ Variables: { user: User } }>()
const comments = await assetService.listComments(fileId, req)
return c.json(comments)
})
.get(
.post(
'/files/:fileId/comments/export',
zValidator('query', exportCommentsQuerySchema),
zValidator('json', exportCommentsRequestSchema),
async (c) => {
const fileId = c.req.param('fileId')
const user = c.get('user')
const { format, timeZone } = c.req.valid('query')
const { format, timeZone } = c.req.valid('json')
await authzService.hasPermission({
user,