Skip to content

Commit

Permalink
Add method back for backwards compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Jul 27, 2023
1 parent 8104bfa commit b2609fd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Server/API/AgentUpdateController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public AgentUpdateController(IWebHostEnvironment hostingEnv,
_logger = logger;
}


[HttpGet("[action]/{platform}")]
[EnableRateLimiting(PolicyNames.AgentUpdateDownloads)]
public async Task<ActionResult> DownloadPackage(string platform)
Expand Down Expand Up @@ -89,6 +88,15 @@ public async Task<ActionResult> DownloadPackage(string platform)
}
}


[HttpGet("[action]/{platform}/{downloadId}")]
[EnableRateLimiting(PolicyNames.AgentUpdateDownloads)]
[Obsolete("This method is only for backwards compatibility. Remove after a few releases.")]
public async Task<ActionResult> DownloadPackage(string platform, string downloadId)
{
return await DownloadPackage(platform);
}

private async Task<bool> CheckForDeviceBan(string deviceIp)
{
if (string.IsNullOrWhiteSpace(deviceIp))
Expand Down

0 comments on commit b2609fd

Please sign in to comment.