public async Task <IActionResult> GetProducts([FromQuery] string sortOption) { var(products, errors) = await _sortService.GetSortedProducts(sortOption); if (errors != null) { return(ValidationProblem(errors)); } return(Ok(products)); }
public async Task <IActionResult> GetProducts([FromQuery] string sortOption) { var(products, errors) = await _sortService.GetSortedProducts(sortOption); if (errors != null) { return(ValidationProblem(errors)); } return(Ok(products)); }