23 lines
No EOL
602 B
C#
23 lines
No EOL
602 B
C#
using MediatR;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Sledgemapper.Api.Handlers;
|
|
using Sledgemapper.Shared.Entities;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Sledgemapper.Api.Controllers
|
|
{
|
|
[Route("map")]
|
|
public class MapController : ControllerBase
|
|
{
|
|
private readonly IMediator _mediator;
|
|
|
|
public MapController(IMediator mediator) { _mediator = mediator; }
|
|
|
|
[HttpPost]
|
|
[ActionName("tile")]
|
|
public async Task Post(string sessionName, Tile tile)
|
|
{
|
|
await _mediator.Publish(new NewTileNotification(sessionName, tile));
|
|
}
|
|
}
|
|
} |