diff --git a/VPMReposSynchronizer.Core/Services/RepoBrowserService.cs b/VPMReposSynchronizer.Core/Services/RepoBrowserService.cs index 9c42dd0..b5f88ef 100644 --- a/VPMReposSynchronizer.Core/Services/RepoBrowserService.cs +++ b/VPMReposSynchronizer.Core/Services/RepoBrowserService.cs @@ -111,7 +111,7 @@ private VpmPackage GetPackageWithUrl(VpmPackageEntity package) var vpmPackage = mapper.Map(package); var fileDownloadEndpoint = new Uri(fileHostOptions.Value.BaseUrl, - $"files/{package.FileId}/download/{package.PackageId}.zip").ToString(); + $"files/download/{package.PackageId}.zip").ToString(); vpmPackage.Url = QueryHelpers.AddQueryString(fileDownloadEndpoint, "fileId", package.FileId); return vpmPackage; diff --git a/VPMReposSynchronizer.Entry/Controllers/FileController.cs b/VPMReposSynchronizer.Entry/Controllers/FileController.cs index b5dcdac..19ce922 100644 --- a/VPMReposSynchronizer.Entry/Controllers/FileController.cs +++ b/VPMReposSynchronizer.Entry/Controllers/FileController.cs @@ -18,8 +18,11 @@ public class FileController(IFileHostService fileHostService) : ControllerBase /// Request file doesn't exist /// Send too many request in a time /// You have been banned - [Route("{fileId}/download/{fileName}")] - [Route("{fileId}/download")] + // ReSharper disable once RouteTemplates.RouteParameterIsNotPassedToMethod +#pragma warning disable ASP0018 + [Route("download/{fileName}")] +#pragma warning restore ASP0018 + [Route("download")] [HttpGet] [ProducesResponseType(StatusCodes.Status302Found)] [ProducesResponseType(StatusCodes.Status404NotFound)] @@ -34,4 +37,4 @@ public async Task DownloadFile(string fileId) return Redirect(fileUri); } -} \ No newline at end of file +}