Switch update check response to use version string
This commit is contained in:
parent
d21cafb4f8
commit
19c4e48570
3 changed files with 4 additions and 4 deletions
|
|
@ -19,9 +19,9 @@
|
|||
Content = $"An update for v{response.Version} is available"
|
||||
});
|
||||
|
||||
if (confirmUpdate)
|
||||
if (confirmUpdate && SemVersion.TryParse(response.Version, SemVersionStyles.Any, out var version))
|
||||
{
|
||||
await UpdateService.UpdateAsync(response.Version);
|
||||
await UpdateService.UpdateAsync(version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace LANCommander.SDK.Models
|
|||
public class CheckForUpdateResponse
|
||||
{
|
||||
public bool UpdateAvailable { get; set; }
|
||||
public SemVersion Version { get; set; }
|
||||
public string Version { get; set; }
|
||||
public string DownloadUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace LANCommander.Controllers.Api
|
|||
if (launcherVersion.ComparePrecedenceTo(currentVersion) < 0)
|
||||
{
|
||||
response.UpdateAvailable = true;
|
||||
response.Version = currentVersion;
|
||||
response.Version = currentVersion.ToString();
|
||||
response.DownloadUrl = Url.Action(nameof(Download));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue