public async Task UpdateUserProgress(UserProgressUpdateDTO userProgress) { var update = Builders <UserProgress> .Update .Set(user => user.Progress, userProgress.Progress * 100) .Set(user => user.LastUpdate, DateTime.Now); await _mongoRepository.UpdateOneAsync(filter => (filter.UserId == userProgress.Id && filter.Module == userProgress.Module), update); }
public async Task UpdateUserProgress(UserProgressUpdateDTO userProgress) { await _userProgressRepository.UpdateUserProgress(userProgress); }
public async Task <IActionResult> UpdateUserProgress(UserProgressUpdateDTO userProgress) { await _userService.UpdateUserProgress(userProgress); return(Ok(new { StatusCode = ReturnStatusCode.Ok })); }