Esempio n. 1
0
        public IActionResult GetAllPosts()
        {
            try
            {
                var users = _context.Posts.ToList();
                _serviceLogger.SendHiddenMessageDetails();

                return(Ok(users));
            }
            catch (Exception ex)
            {
                _serviceLogger.SendHiddenMessageError();
                return(StatusCode(500, $"Internal server error: {ex}"));
            }
        }