Skip to content

Commit

Permalink
don't clobber the cached release info when overwriting the key
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Jul 1, 2024
1 parent 57f412a commit 5590d60
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
7 changes: 6 additions & 1 deletion XLWebServices/Controllers/Dalamud/ReleaseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
17 changes: 17 additions & 0 deletions XLWebServices/Services/DalamudReleaseDataService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 5590d60

Please sign in to comment.