diff --git a/backend/LexBoxApi/Controllers/FwLiteReleaseController.cs b/backend/LexBoxApi/Controllers/FwLiteReleaseController.cs index 586fc2798..3f1c2ec09 100644 --- a/backend/LexBoxApi/Controllers/FwLiteReleaseController.cs +++ b/backend/LexBoxApi/Controllers/FwLiteReleaseController.cs @@ -22,7 +22,7 @@ public class FwLiteReleaseController(FwLiteReleaseService releaseService) : Cont public async Task DownloadLatest() { using var activity = LexBoxActivitySource.Get().StartActivity(); - var latestRelease = await releaseService.GetLatestRelease(default); + var latestRelease = await releaseService.GetLatestRelease(); if (latestRelease is null) { activity?.SetStatus(ActivityStatusCode.Error, "Latest release not found"); @@ -41,7 +41,7 @@ public async ValueTask> LatestRelease(string? appVer { using var activity = LexBoxActivitySource.Get().StartActivity(); activity?.AddTag(FwLiteReleaseService.FwLiteClientVersionTag, appVersion ?? "unknown"); - var latestRelease = await releaseService.GetLatestRelease(default); + var latestRelease = await releaseService.GetLatestRelease(); activity?.AddTag(FwLiteReleaseService.FwLiteReleaseVersionTag, latestRelease?.Version); if (latestRelease is null) return NotFound(); return latestRelease; diff --git a/backend/LexBoxApi/Services/FwLiteReleases/FwLiteReleaseService.cs b/backend/LexBoxApi/Services/FwLiteReleases/FwLiteReleaseService.cs index ffa0645e8..294a2618f 100644 --- a/backend/LexBoxApi/Services/FwLiteReleases/FwLiteReleaseService.cs +++ b/backend/LexBoxApi/Services/FwLiteReleases/FwLiteReleaseService.cs @@ -12,7 +12,7 @@ public class FwLiteReleaseService(IHttpClientFactory factory, HybridCache cache) public const string FwLiteClientVersionTag = "app.fw-lite.client.version"; public const string FwLiteReleaseVersionTag = "app.fw-lite.release.version"; - public async ValueTask GetLatestRelease(CancellationToken token) + public async ValueTask GetLatestRelease(CancellationToken token = default) { return await cache.GetOrCreateAsync(GithubLatestRelease, FetchLatestReleaseFromGithub, @@ -22,7 +22,7 @@ public class FwLiteReleaseService(IHttpClientFactory factory, HybridCache cache) public async ValueTask ShouldUpdate(string appVersion) { - var latestRelease = await GetLatestRelease(default); + var latestRelease = await GetLatestRelease(); if (latestRelease is null) return new ShouldUpdateResponse(null); var shouldUpdateToRelease = ShouldUpdateToRelease(appVersion, latestRelease.Version);