Add HttpGet endpoint to OutResController for data retrieval
Added a new asynchronous `Get` method to the `OutResController` class in the `ReC.API.Controllers` namespace. This method handles HTTP GET requests, accepts a `ReadOutResQuery` object as a query parameter, and uses the `mediator` to process the query. The result is returned in an HTTP 200 OK response. This change enables retrieval of resources or data based on the provided query parameters.
This commit is contained in:
@@ -8,5 +8,6 @@ namespace ReC.API.Controllers;
|
||||
[ApiController]
|
||||
public class OutResController(IMediator mediator) : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Get([FromQuery] ReadOutResQuery query) => Ok(await mediator.Send(query));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user