get support :)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user