Exemplo n.º 1
0
        protected ActionResult FormattedResponse(Object result = null)
        {
            if (HasNoErros())
            {
                return(Ok(new
                {
                    success = true,
                    data = result
                }));
            }

            return(BadRequest(new
            {
                success = false,
                errors = _notify.GetAllNotifications().Select(n => n.Mesage)
            }));
        }