Пример #1
0
        public IActionResult CreateOrAddSkill(string userId, [FromBody] SkillDto skillDto)
        {
            var skill = _mapper.Map <Skill>(skillDto);

            try
            {
                var addedSkill = _skillService.AddOrCreateSkill(userId, skill);
                var sk         = _mapper.Map <SkillDto>(addedSkill);

                return(Ok(sk));
            }
            catch (AppException e)
            {
                return(BadRequest(new { message = e.Message }));
            }
        }