Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteBadgeAsync([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var course = await _service.FindBadgeAsync(id);

            if (course == false)
            {
                return(NotFound());
            }

            await _service.DeleteBadgeAsync(id);

            return(Ok(course));
        }