Ejemplo n.º 1
0
        public IActionResult GetField(int id)
        {
            try
            {
                var field = _ideationManager.GetField(id);
                if (field == null)
                {
                    return(NotFound("Field not found."));
                }

                return(Ok(_mapper.Map <FieldDto>(field)));
            }
            catch (Exception e)
            {
                return(BadRequest($"Something went wrong in getting the field: {e.Message}"));
            }
        }