using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using TOOHUCardAPI.Data; using TOOHUCardAPI.Models; namespace TOOHUCardAPI.Controllers { [Route("api/[controller]")] [ApiController] public class PlayerDataController : MethodBasedController { /** * The game uses a single endpoint for player data. * The object they send has a method field that's used to decide what's being done * So let's use a single entry point and redirect based on that */ [HttpPost] public async Task EntryPoint(IMethodBasedRequest methodRequest) { return null; } } public class MissingEndpointHandlerException : Exception { public MissingEndpointHandlerException(string? method) : base($"Handler for [{method}] is either missing or incorrectly setup.") { } } }