From 2e8cb16ad4a095af61bf4b4a66003e39b4fad828 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:41:12 +0100 Subject: [PATCH] check versionStudio instead of version --- Bloxstrap/RobloxDeployment.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/RobloxDeployment.cs b/Bloxstrap/RobloxDeployment.cs index 38d12f2..8315a60 100644 --- a/Bloxstrap/RobloxDeployment.cs +++ b/Bloxstrap/RobloxDeployment.cs @@ -4,6 +4,8 @@ { public const string DefaultChannel = "production"; + private const string VersionStudioHash = "version-012732894899482c"; + public static string BaseUrl { get; private set; } = null!; private static readonly Dictionary ClientVersionCache = new(); @@ -28,10 +30,16 @@ try { - var response = await App.HttpClient.GetAsync($"{url}/version", token); + var response = await App.HttpClient.GetAsync($"{url}/versionStudio", token); if (!response.IsSuccessStatusCode) 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) {