Beispiel #1
0
        public async Task <IActionResult> Put([FromBody] SkillDTO skill)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var success = await _skillLogic.UpdateAsync(skill);

            if (success == ResponseLogic.SUCCESS)
            {
                return(NoContent());
            }
            else if (success == ResponseLogic.NOT_FOUND)
            {
                return(NotFound());
            }
            else
            {
                return(StatusCode(500));
            }
        }