@@ -105,6 +105,7 @@ namespace GxPress.Api.AdminControllers
/// </summary>
/// <returns></returns>
[HttpGet("channel-category/list/{appChannelId}")]
+ [AllowAnonymous]
public async Task<IEnumerable<ChannelCategoryResult>> ChannelCategoryGetAllAsync(int appChannelId)
{
return await appChannelService.GetAllAsync(appChannelId);
@@ -62,6 +62,14 @@ namespace GxPress.Service.Implement.AppChannel
if (!item.IsChildren)
item.MediaIds = await channelCategoryMediaRepository.GetAllAsync(item.Id);
+ else
+ {
+ foreach (var category in item.Children)
+ if (!category.IsChildren)
+ category.MediaIds = await channelCategoryMediaRepository.GetAllAsync(item.Id);
+ }
}
return result;