diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs index c5113ae630..6d7b23e8c6 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs @@ -79,24 +79,6 @@ namespace Volo.Blogging.Posts return new ListResultDto(postDtos); } - private async Task> FilterPostsByTag(List allPostDtos, Tag tag) - { - var filteredPostDtos = new List(); - var posts = await _postRepository.GetListAsync(); - - foreach (var postDto in allPostDtos) - { - if (!postDto.Tags.Any(p=> p.Id == tag.Id)) - { - continue; - } - - filteredPostDtos.Add(postDto); - } - - return filteredPostDtos; - } - public async Task GetForReadingAsync(GetPostInput input) { var post = await _postRepository.GetPostByUrl(input.BlogId, input.Url); @@ -273,5 +255,23 @@ namespace Volo.Blogging.Posts } return new List(tags.Split(",").Select(t => t.Trim())); } + + private async Task> FilterPostsByTag(List allPostDtos, Tag tag) + { + var filteredPostDtos = new List(); + var posts = await _postRepository.GetListAsync(); + + foreach (var postDto in allPostDtos) + { + if (!postDto.Tags.Any(p => p.Id == tag.Id)) + { + continue; + } + + filteredPostDtos.Add(postDto); + } + + return filteredPostDtos; + } } }