From d2352a4a13a15b17db328c8b1920c86c8987a055 Mon Sep 17 00:00:00 2001 From: SalmanMahsood Date: Wed, 13 May 2026 05:28:25 +0100 Subject: [PATCH] changes in FollowUp controller endpoints --- LTS/LTS.API/Features/Followups/FollowupController.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/LTS/LTS.API/Features/Followups/FollowupController.cs b/LTS/LTS.API/Features/Followups/FollowupController.cs index 3e3727a..1490ca6 100644 --- a/LTS/LTS.API/Features/Followups/FollowupController.cs +++ b/LTS/LTS.API/Features/Followups/FollowupController.cs @@ -17,21 +17,20 @@ public FollowupController(IMediator mediator) _mediator = mediator; } [HttpPost] - public async Task CreateFollowup([FromQuery] CreateFollowupCommand command) + public async Task CreateFollowup([FromBody] CreateFollowupCommand command) { var result = await _mediator.Send(command); return Ok(result); } - - [HttpGet] - public async Task GetAll([FromQuery] GetFollowupsByCaseQuery query) + [HttpGet("{caseId}")] + public async Task GetByCase(Guid caseId) { - var result = await _mediator.Send(query); + var result = await _mediator.Send(new GetFollowupsByCaseQuery(caseId)); return Ok(result); } [HttpPut] - public async Task Update([FromQuery] UpdateFollowupCommand command) + public async Task Update([FromBody] UpdateFollowupCommand command) { var result = await _mediator.Send(command); return Ok(result);