diff --git a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs
index 0a7e6fa59..beb55f6b1 100644
--- a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs
@@ -163,10 +163,10 @@ namespace IRaCIS.Core.Application.Service
///
///
///
- [HttpDelete("{id:guid}")]
- public async Task DeleteAttachment(Guid id)
+ [HttpPost]
+ public async Task DeleteAttachment(DeleteAttachment inDto)
{
- var success = await _attachmentrepository.DeleteFromQueryAsync(t => t.Id == id, true);
+ var success = await _attachmentrepository.DeleteFromQueryAsync(t => inDto.Ids.Contains(t.Id));
return ResponseOutput.Ok();
}
diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs
index 3c057497c..336a7f51e 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs
@@ -40,6 +40,11 @@
public bool IsAuthorizedView { get; set; }
}
+ public class DeleteAttachment
+ {
+ public List Ids { get; set; }
+ }
+
public class GetTrialDoctorSelectInDto
{
public Guid TrialId { get; set; }