Spaces:
Running
Running
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 | |