diff --git a/XLWebServices/Controllers/Dalamud/ReleaseController.cs b/XLWebServices/Controllers/Dalamud/ReleaseController.cs index 82e51ab..4080c16 100644 --- a/XLWebServices/Controllers/Dalamud/ReleaseController.cs +++ b/XLWebServices/Controllers/Dalamud/ReleaseController.cs @@ -100,7 +100,12 @@ public IActionResult VersionInfo([FromQuery] string? track = "", [FromQuery] str // Patch in the key of the aliased version if (keyOverride != null) - resultVersion.Key = keyOverride; + { + resultVersion = new DalamudReleaseDataService.DalamudVersion(resultVersion) + { + Key = keyOverride + }; + } return new JsonResult(resultVersion); } diff --git a/XLWebServices/Services/DalamudReleaseDataService.cs b/XLWebServices/Services/DalamudReleaseDataService.cs index e93401f..8cbc73a 100644 --- a/XLWebServices/Services/DalamudReleaseDataService.cs +++ b/XLWebServices/Services/DalamudReleaseDataService.cs @@ -354,6 +354,23 @@ public class DalamudDeclarativeTrack public class DalamudVersion { + public DalamudVersion(DalamudVersion toCopy) + { + this.Key = toCopy.Key; + this.Track = toCopy.Track; + this.AssemblyVersion = toCopy.AssemblyVersion; + this.RuntimeVersion = toCopy.RuntimeVersion; + this.RuntimeRequired = toCopy.RuntimeRequired; + this.SupportedGameVer = toCopy.SupportedGameVer; + this.IsApplicableForCurrentGameVer = toCopy.IsApplicableForCurrentGameVer; + this.Changelog = toCopy.Changelog; + this.DownloadUrl = toCopy.DownloadUrl; + } + + public DalamudVersion() + { + } + public string Key { get; set; } public string Track { get; set; }