Spaces:
Running
Running
File size: 629 Bytes
47b5f0c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from app.infrastructure.repository.document_handeler_repository import (
DocumentHandelerRepository,
)
class DeleteDocumentFeature:
def __init__(self, update_document_repository: DocumentHandelerRepository):
self.update_document_repository = update_document_repository
async def delete_document_by_filename(self, document_name: str) -> bool:
document = self.update_document_repository.find_points_by_document_name(
document_name
)
if document is None:
return False
self.update_document_repository.delete_document_by_id(document)
return True
|