Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions LTS/LTS.API/Features/Followups/FollowupController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@ public FollowupController(IMediator mediator)
_mediator = mediator;
}
[HttpPost]
public async Task<IActionResult> CreateFollowup([FromQuery] CreateFollowupCommand command)
public async Task<IActionResult> CreateFollowup([FromBody] CreateFollowupCommand command)
{
var result = await _mediator.Send(command);
return Ok(result);
}

[HttpGet]
public async Task<IActionResult> GetAll([FromQuery] GetFollowupsByCaseQuery query)
[HttpGet("{caseId}")]
public async Task<IActionResult> GetByCase(Guid caseId)
{
var result = await _mediator.Send(query);
var result = await _mediator.Send(new GetFollowupsByCaseQuery(caseId));
return Ok(result);
}

[HttpPut]
public async Task<IActionResult> Update([FromQuery] UpdateFollowupCommand command)
public async Task<IActionResult> Update([FromBody] UpdateFollowupCommand command)
{
var result = await _mediator.Send(command);
return Ok(result);
Expand Down