1
0
mirror of synced 2025-02-16 10:42:42 +01:00
2023-02-17 00:38:01 +08:00

24 lines
706 B
C#

using Application.Api;
using Application.Common.Models;
using Microsoft.AspNetCore.Mvc;
namespace MainServer.Controllers.API;
[ApiController]
[Route("api/[controller]")]
public class PlayOptionController : BaseController<PlayOptionController>
{
[HttpGet("{cardId:long}")]
public async Task<ActionResult<ServiceResult<PlayOptionData>>> GetPlayOptionById(long cardId)
{
var result = await Mediator.Send(new GetPlayOptionQuery(cardId));
return result;
}
[HttpPost]
public async Task<ActionResult<ServiceResult<bool>>> SetPlayOption(PlayOptionData data)
{
var result = await Mediator.Send(new SetPlayOptionCommand(data));
return result;
}
}