Beispiel #1
0
        public ObjectResult GetFeedByUserId(Guid id)
        {
            try
            {
                if (Guid.Empty == id)
                {
                    throw new ArgumentException("Id inválido");
                }

                return(Ok(_app.GetFeedByUserId(id)));
            }
            catch (Exception ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
        }
        public ActionResult GetFeedByUserId(Guid userId)
        {
            try
            {
                if (Guid.Empty == userId)
                {
                    throw new ArgumentException("Id inválido");
                }

                return(Ok(_postApp.GetFeedByUserId(userId)));
            }
            catch (Exception ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
        }