fix(knowledge): paginate document list without content

This commit is contained in:
mlogclub
2026-04-30 13:43:22 +08:00
parent 3245c7f73b
commit 8be2d06283
8 changed files with 176 additions and 42 deletions
+3 -1
View File
@@ -1336,6 +1336,8 @@ export type KnowledgeDocument = {
updateUserName: string
}
export type KnowledgeDocumentListItem = Omit<KnowledgeDocument, "content">
export type KnowledgeFAQ = {
id: number
knowledgeBaseId: number
@@ -1579,7 +1581,7 @@ export function rebuildKnowledgeBaseIndex(id: number) {
export function fetchKnowledgeDocuments(
query?: Record<string, string | number | undefined>
) {
return request<PageResult<KnowledgeDocument>>(
return request<PageResult<KnowledgeDocumentListItem>>(
`/api/dashboard/knowledge-document/list${toQueryString(query)}`
)
}