예제 #1
0
        public async Task <IActionResult> Delete(Guid id)
        {
            var userOwnsSkill = await _skillService.UserOwnsSkillAsync(id, HttpContext.GetUserId());

            if (!userOwnsSkill)
            {
                return(NotFound());
            }

            var deleted = await _skillService.DeleteSkillByIdAsync(id);

            if (deleted)
            {
                return(NoContent());
            }
            return(NotFound());
        }