Skip to content

Commit

Permalink
Switched version check to website rather than github (SubnauticaNitro…
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding-Hen authored Aug 2, 2021
1 parent 8130977 commit 7e9be9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NitroxModel/Helper/WebHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static string GetPublicIP()

public static Version GetNitroxLatestVersion()
{
HttpWebRequest req = WebRequest.Create("https://api.github.com/repos/SubnauticaNitrox/Nitrox/releases/latest") as HttpWebRequest;
HttpWebRequest req = WebRequest.Create("https://nitrox.rux.gg/api/version/latest") as HttpWebRequest;
req.Method = "GET";
req.UserAgent = "Nitrox";
req.ContentType = "application/json";
Expand All @@ -33,7 +33,7 @@ public static Version GetNitroxLatestVersion()
using (StreamReader sr = new StreamReader(req.GetResponse().GetResponseStream()))
{
string json = sr.ReadToEnd();
Regex rx = new Regex(@"""name"":""([^""]*)""");
Regex rx = new Regex(@"""version"":""([^""]*)""");
Match match = rx.Match(json);

if (match.Success)
Expand Down

0 comments on commit 7e9be9c

Please sign in to comment.