Esempio n. 1
0
        public ChallengeSelectionFilterDto UpdateRankFilterStatus(
            ChallengeSelectionFilterDto challengeSelectionFilterDto)
        {
            for (var index = 0; index < challengeSelectionFilterDto.Keep.Count; index++)
            {
                var filter       = challengeSelectionFilterDto.Keep[index];
                var filterStatus = _filterStatusRepository.GetFilterStatus(filter.Id);
                filterStatus.Rank = index + 1;
                _filterStatusRepository.Update(filterStatus);
            }

            var challenge = _challengeRepository.GetById(challengeSelectionFilterDto.ChallengeId);

            if (challenge.ChallengeState == 6)
            {
                challenge.ChallengeState += 1;
            }

            return(challengeSelectionFilterDto);
        }
Esempio n. 2
0
 private FilterStatus GetFilterStatus(Guid filterId)
 {
     return(_filterStatusRepository.GetFilterStatus(filterId));
 }