backend phase 11
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Asp.Versioning;
|
||||
using Baya.Application.Features.Refunds.Queries.GetRefundStatus;
|
||||
using Baya.Application.Models.Refunds;
|
||||
using Baya.WebFramework.Attributes;
|
||||
using Baya.WebFramework.BaseController;
|
||||
using Mediator;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Baya.Web.Api.Controllers.V1;
|
||||
|
||||
/// <summary>The customer-facing refund status — the only customer-visible refund surface (there is no
|
||||
/// self-service refund initiation). Tenancy-scoped: a customer sees only their own refund.</summary>
|
||||
[ApiVersion("1")]
|
||||
[ApiController]
|
||||
[Route("api/v{version:apiVersion}/refunds")]
|
||||
[Authorize]
|
||||
[Display(Description = "Customer refund status")]
|
||||
public sealed class RefundsController(ISender sender) : BaseController
|
||||
{
|
||||
[HttpGet("{id}/status")]
|
||||
[ProducesOkApiResponseType<RefundStatusDto>]
|
||||
public async Task<IActionResult> Status(long id, CancellationToken cancellationToken)
|
||||
=> OperationResult(await sender.Send(new GetRefundStatusQuery(id), cancellationToken));
|
||||
}
|
||||
Reference in New Issue
Block a user