public async Task <IActionResult> GetAllInspections([FromBody] GetAllInspectionsRequest request) { _logger.LogInformation("Calling GetAllInspections from AdminController with request: {@0}", request); if (!ModelState.IsValid) { return(BadRequest()); } return(Ok(await _adminAppService.GetAllInspectionsAsync(request.UserId, request.InspectionDate))); }
public async Task <IEnumerable <Inspection> > GetAllInspections(int userId) { _logger.LogInformation("Calling GetAllInspections from AdminController with userId: {0}", userId); return(await _adminAppService.GetAllInspectionsAsync(userId)); }