Enhance company document management with file ID sanitization and detachment functionality
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Updated the `UploadDocuments` method to sanitize document file IDs before saving, ensuring only valid references are stored. - Introduced `DetachDocumentFileID` method in the `companyService` to remove file IDs from all companies referencing a deleted file, improving data integrity. - Enhanced the `companyRepository` with a new method to handle the removal of document file IDs from the database. - Updated the `filestore` handler to utilize the new detachment functionality when files are deleted, ensuring consistent state across domain entities. This update improves the management of document file IDs within the company domain, enhancing data integrity and reference handling.
This commit is contained in:
+1
-1
@@ -253,7 +253,7 @@ func main() {
|
||||
contactHandler := contact.NewHandler(contactService, hcaptchaVerifier)
|
||||
cmsHandler := cms.NewHandler(cmsService)
|
||||
kanbanHandler := kanban.NewHandler(kanbanService)
|
||||
fileStoreHandler := filestore.NewHandler(fileStoreService, logger)
|
||||
fileStoreHandler := filestore.NewHandler(fileStoreService, logger, companyService)
|
||||
documentScraperHandler := document_scraper.NewHandler(documentScraperService, logger)
|
||||
dashboardHandler := dashboard.NewHandler(dashboardService)
|
||||
aiPipelineHandler := ai_pipeline.NewHandler(aiPipelineService)
|
||||
|
||||
Reference in New Issue
Block a user