Example #1
0
        public async Task <IHttpActionResult> UpdateSkill(string skillId, [FromBody] Skill skill)
        {
            if (skill.Id != skillId)
            {
                return(BadRequest("Field Permission Id does not match with request id"));
            }
            var result = await _skillsService.UpdateSkillAsync(skill);

            return(Ok(result));
        }
Example #2
0
        public async Task <IActionResult> Put(Guid id, [FromBody] SkillDto skillDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await _skillsService.UpdateSkillAsync(id, skillDto);

            return(new NoContentResult());
        }