public async Task <IActionResult> GetAlert(int id) { try { var result = await _alert.GetAlert(id); if (result != null) { var Response = new ResponseViewModel(true, HttpStatusCode.OK, "SUCCESS", result); return(Ok(Response)); } else { var Response = new ResponseViewModel(false, HttpStatusCode.NoContent, "failed", null); return(Ok(Response)); } } catch { return(BadRequest()); } }