Lots of additions and changes

This commit is contained in:
2021-10-30 11:20:36 -04:00
parent 3051b63e44
commit 9cf11e982f
29 changed files with 557 additions and 46 deletions

View File

@@ -11,10 +11,10 @@ namespace TOOHUCardAPI.Controllers
{
public class MethodBasedController : ControllerBase
{
public delegate Task<object> EndpointHandler(string requestBody);
public delegate Task<IActionResult> EndpointHandler(string requestBody);
private static Dictionary<Type, MethodMap> MethodMapByType = new Dictionary<Type, MethodMap>();
protected Task<object> InvokeEndpointHandlerForMethod<T>(object _this, string method, string body)
protected Task<IActionResult> InvokeEndpointHandlerForMethod<T>(object _this, string method, string body)
{
MethodMap registeredEndpointHandlers = GetMethodMapForType<T>();
if (registeredEndpointHandlers.ContainsKey(method))