using Hotline.Orders;
using Hotline.Share.Dtos.Order;
using Microsoft.AspNetCore.Mvc;

namespace Hotline.Api.Controllers.OrderApi;

public class OrderComplementController : BaseController
{
    private readonly IOrderDomainService _orderDomainService;

    public OrderComplementController(IOrderDomainService orderDomainService)
    {
        _orderDomainService = orderDomainService;
    }
    
    /// <summary>
    /// 补充
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    [HttpPost]
    public async Task<string> Supplement([FromBody] AddOrderComplementDto dto)
    {
        return await _orderDomainService.AddOrderComplementAsync(dto, HttpContext.RequestAborted);
    }
}