Exemplo n.º 1
0
        public async Task Delete(string id)
        {
            var doc = await this.GetDocumentIfValidAndAuthed(id, true);

            var jobs = await this.documentDbService.GetDocuments <BatchJob>((j) => j.DocumentId == doc.Id);

            await JobHelper.DeleteJobsAndResourcesFromDoc(doc, this.documentDbService, this.storageService, this.batchService, this.logger);

            this.logger.LogInformation($"Deleted Jobs and Resources for document {id}.");
            await DocumentHelper.DeleteDocumentAndResources(doc, this.storageService, this.documentDbService, this.logger);

            this.logger.LogInformation($"Deleted Document and Resources for document {id}.");
        }