fix 文档管理模块 & 法规对话模块
This commit is contained in:
@@ -75,6 +75,15 @@ class JsonDocumentRepository(DocumentRepository):
|
||||
documents.sort(key=lambda item: item.updated_at, reverse=True)
|
||||
return documents[:limit] if limit is not None else documents
|
||||
|
||||
def delete(self, doc_id: str) -> bool:
|
||||
"""Delete a document record."""
|
||||
payload = self._load()
|
||||
if doc_id not in payload:
|
||||
return False
|
||||
del payload[doc_id]
|
||||
self._save(payload)
|
||||
return True
|
||||
|
||||
def update_status(
|
||||
self,
|
||||
doc_id: str,
|
||||
|
||||
Reference in New Issue
Block a user