Exemplo n.º 1
0
        public async Task <IEnumerable <AvatarLayer> > GetLayersAsync()
        {
            var currentCultureName = _userContextProvider.GetCurrentCulture()?.Name;
            var currentLanguageId  =
                await _languageService.GetLanguageIdAsync(currentCultureName);

            VerifyManagementPermission();
            var layers = await _avatarLayerRepository.GetAllAsync(GetCurrentSiteId());

            if (layers.Count > 0)
            {
                foreach (var layer in layers.ToList())
                {
                    var layerText = _avatarLayerRepository
                                    .GetNameAndLabelByLanguageId(layer.Id, currentLanguageId);
                    layer.Name        = layerText["Name"];
                    layer.RemoveLabel = layerText["RemoveLabel"];
                }
            }
            return(layers);
        }
Exemplo n.º 2
0
 public async Task <IEnumerable <AvatarLayer> > GetLayersAsync()
 {
     VerifyManagementPermission();
     return(await _avatarLayerRepository.GetAllAsync(GetCurrentSiteId()));
 }