refinement phase 3
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Asp.Versioning;
|
||||
using Baya.Application.Features.Refunds.Queries.GetRefundByBooking;
|
||||
using Baya.Application.Features.Refunds.Queries.GetRefundStatus;
|
||||
using Baya.Application.Models.Refunds;
|
||||
using Baya.WebFramework.Attributes;
|
||||
@@ -23,4 +24,10 @@ public sealed class RefundsController(ISender sender) : BaseController
|
||||
[ProducesOkApiResponseType<RefundStatusDto>]
|
||||
public async Task<IActionResult> Status(long id, CancellationToken cancellationToken)
|
||||
=> OperationResult(await sender.Send(new GetRefundStatusQuery(id), cancellationToken));
|
||||
|
||||
// Reach the refund from its booking id (the id the customer holds) — 404 when none exists (REQ-021).
|
||||
[HttpGet("by_booking/{bookingId}")]
|
||||
[ProducesOkApiResponseType<RefundStatusDto>]
|
||||
public async Task<IActionResult> ByBooking(long bookingId, CancellationToken cancellationToken)
|
||||
=> OperationResult(await sender.Send(new GetRefundByBookingQuery(bookingId), cancellationToken));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user