Add audio in export configuration

This commit is contained in:
Fransolet Thomas 2023-02-10 17:06:23 +01:00
parent 52ec413761
commit 88ab87c9ee

View File

@ -266,7 +266,7 @@ namespace ManagerService.Controllers
[ProducesResponseType(typeof(string), 404)] [ProducesResponseType(typeof(string), 404)]
[ProducesResponseType(typeof(string), 500)] [ProducesResponseType(typeof(string), 500)]
[HttpGet("{id}/export")] [HttpGet("{id}/export")]
public FileContentResult Export(string id) public FileContentResult Export(string id, string language)
{ {
try try
{ {
@ -367,6 +367,14 @@ namespace ManagerService.Controllers
addResourceToList(resourceDTOs, image.resourceId); addResourceToList(resourceDTOs, image.resourceId);
} }
} }
foreach (var audio in articleDTO.audioIds.Where(a => a.language == language))
{
if (audio.value != null)
{
addResourceToList(resourceDTOs, audio.value);
}
}
break; break;
case SectionType.Menu: case SectionType.Menu:
case SectionType.Web: case SectionType.Web: