Exemple #1
0
        public async Task <IActionResult> CreateSkill([FromBody] SkillDto skill)
        {
            if (!Enum.IsDefined(typeof(SkillType), skill.Type))
            {
                return(BadRequest());
            }

            var createdSkill = await _skillService.AddOrUpdate(skill);

            return(CreatedAtRoute("SkillById", new { id = createdSkill.Id }, createdSkill));
        }