public IActionResult GetAlertsFiltered(string lineId, [FromBody] GetAlertsRequest request) { if (!ModelState.IsValid) { return(this.BadRequest(ModelState)); } return(Ok(_business.GetAlertsFiltered(lineId, request.FromDate.Value, request.ToDate.Value))); }
public GetAlertsResponse GetAlerts(GetAlertsRequest request) { var alerts = jobManager.JobStore.GetAlerts(request.Skip, request.Take).Select(a => new Alert(a)).ToList(); if (alerts == null) { alerts = new List <Alert>(); } return(new GetAlertsResponse { Alerts = alerts, }); }