get support :)

This commit is contained in:
David Lebee
2021-02-05 14:05:18 -05:00
parent 7a67866dc3
commit cc0b01bfee
4 changed files with 48 additions and 3 deletions
@@ -19,6 +19,17 @@ namespace PoweredSoft.CQRS.AspNetCore.Mvc
return BadRequest(ModelState);
return Ok(await handler.HandleAsync(query, this.Request.HttpContext.RequestAborted));
}
[HttpGet, QueryControllerAuthorization]
public async Task<ActionResult<TQueryResult>> HandleGet([FromServices] IQueryHandler<TQuery, TQueryResult> handler,
[FromQuery] TQuery query)
{
if (!ModelState.IsValid)
return BadRequest(ModelState);
return Ok(await handler.HandleAsync(query, this.Request.HttpContext.RequestAborted));
}
}