public async Task <IActionResult> AssignBadgeAsync([FromBody] AssignBadgeDTO assignBadgeDTO) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await _service.AssignBadge(assignBadgeDTO); if (result != null) { return(Ok(result)); } return(BadRequest()); }