mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
check versionStudio instead of version
This commit is contained in:
parent
7123aa7951
commit
2e8cb16ad4
@ -4,6 +4,8 @@
|
|||||||
{
|
{
|
||||||
public const string DefaultChannel = "production";
|
public const string DefaultChannel = "production";
|
||||||
|
|
||||||
|
private const string VersionStudioHash = "version-012732894899482c";
|
||||||
|
|
||||||
public static string BaseUrl { get; private set; } = null!;
|
public static string BaseUrl { get; private set; } = null!;
|
||||||
|
|
||||||
private static readonly Dictionary<string, ClientVersion> ClientVersionCache = new();
|
private static readonly Dictionary<string, ClientVersion> ClientVersionCache = new();
|
||||||
@ -28,10 +30,16 @@
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var response = await App.HttpClient.GetAsync($"{url}/version", token);
|
var response = await App.HttpClient.GetAsync($"{url}/versionStudio", token);
|
||||||
|
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
throw new HttpResponseException(response);
|
throw new HttpResponseException(response);
|
||||||
|
|
||||||
|
// versionStudio is the version hash for the last MFC studio to be deployed.
|
||||||
|
// the response body should always be "version-012732894899482c".
|
||||||
|
string content = await response.Content.ReadAsStringAsync(token);
|
||||||
|
if (content != VersionStudioHash)
|
||||||
|
throw new Exception($"versionStudio response does not match (expected {VersionStudioHash}, got {content})");
|
||||||
}
|
}
|
||||||
catch (TaskCanceledException)
|
catch (TaskCanceledException)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user