public IActionResult UpdateUserChallenge(int id, [FromQuery] int userId, [FromBody] UserChallengesDto challenge) { try { _service.UpdateUserChallenge(id, userId, challenge); return(Ok()); } catch (Exception ex) { Console.WriteLine(ex); } return(BadRequest()); }
public void UpdateUserChallenge(int id, int userId, UserChallengesDto item) { var challenge = _mapper.Map <UsersChallenges>(item); _repository.UpdateUserChallenge(id, userId); }