27 lines
750 B
C#
27 lines
750 B
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Singer_Hexdive.Models.IOs;
|
|
using Singer_Hexdive.Services.FunctionHandlers;
|
|
|
|
namespace Singer_Hexdive.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("api")]
|
|
public class ApiController : ControllerBase
|
|
{
|
|
private readonly MerchantManager _merchantManager;
|
|
|
|
public ApiController(MerchantManager merchantManager)
|
|
{
|
|
_merchantManager = merchantManager;
|
|
}
|
|
|
|
[HttpPost("merchant")]
|
|
public async Task<IActionResult> MerchantExecute([FromBody] ApiRequest request)
|
|
{
|
|
var response = await _merchantManager.Execute(request);
|
|
return StatusCode(response.StatusCode, response);
|
|
}
|
|
}
|
|
}
|