Add method back for backwards compatibility.

This commit is contained in:
Jared Goodwin 2023-07-27 14:47:46 -07:00
parent 8104bfa5ba
commit b2609fdbb7

View File

@ -37,7 +37,6 @@ public class AgentUpdateController : ControllerBase
_logger = logger;
}
[HttpGet("[action]/{platform}")]
[EnableRateLimiting(PolicyNames.AgentUpdateDownloads)]
public async Task<ActionResult> DownloadPackage(string platform)
@ -89,6 +88,15 @@ public class AgentUpdateController : ControllerBase
}
}
[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))