using LANCommander.SDK.Models.Manifest; using LANCommander.Server.ImportExport.Models; using LANCommander.Server.Services; namespace LANCommander.Server.ImportExport.Exporters; public class RedistributableExporter(RedistributableService redistributableService) : BaseExporter { public override async Task GetExportInfoAsync(Data.Models.Redistributable record) { return new ExportItemInfo() { Id = record.Id, Name = record.Name, }; } public override bool CanExport(Redistributable record) => true; public override async Task ExportAsync(Guid id) { var redistributable = await redistributableService.GetManifestAsync(id); if (redistributable.Archives is null) redistributable.Archives = new List(); if (redistributable.Scripts is null) redistributable.Scripts = new List