Skip to content

Commit

Permalink
fix: adjust due date endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pdevito3 committed Dec 1, 2024
1 parent edfb952 commit d34ef61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions PeakLims/src/PeakLims/Controllers/v1/TestOrdersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ public async Task<IActionResult> MarkTestOrderAsNormal([FromRoute] Guid testOrde
/// Adjusts the due date of a test order
/// </summary>
[Authorize]
[HttpPut("{testOrderId:guid}/duedate", Name = "AdjustTestOrderDueDate")]
public async Task<IActionResult> AdjustTestOrderDueDate([FromRoute] Guid testOrderId, [FromBody] DateOnly dueDate)
[HttpPut("{testOrderId:guid}/adjustDueDate", Name = "AdjustTestOrderDueDate")]
public async Task<IActionResult> AdjustTestOrderDueDate([FromRoute] Guid testOrderId, AdjustDueDateDto request)
{
var command = new AdjustTestOrderDueDate.Command(testOrderId, dueDate);
var command = new AdjustTestOrderDueDate.Command(testOrderId, request.DueDate);
await _mediator.Send(command);
return NoContent();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace PeakLims.Domain.TestOrders.Dtos;

public record AdjustDueDateDto(DateOnly DueDate);
2 changes: 1 addition & 1 deletion PeakLims/src/PeakLims/PeakLims.WebApi.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d34ef61

Please sign in to comment.