예제 #1
0
        public async Task <IActionResult> NewAssignedAlerts()
        {
            try
            {
                var result = await _alert.NewAssignedAlerts();

                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());
            }
        }