Ejemplo n.º 1
0
        public HttpResponseMessage Edit([FromBody] LevelModel levelModel)
        {
            Level level = levelRepository.GetById(levelModel.Id);

            level.UpdateLevelDifficult(levelModel.PictureAmount, levelModel.Duration, levelModel.Multiplier);

            if (level.Validate())
            {
                return(ResponderOK(levelRepository.EditLevel(level)));
            }
            return(ResponderErro(level.Messages));
        }