Skip to content

Commit

Permalink
change update check mcp url
Browse files Browse the repository at this point in the history
  • Loading branch information
InvoxiPlayGames committed Nov 10, 2023
1 parent 1ceef52 commit 6482624
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions EpicLogin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,13 @@ public EpicLogin(string client_id = LAUNCHER_CLIENT, string client_secret = LAUN
return null;
return new EpicAccount(login_response);
}

public async Task<EpicAccount?> LoginWithExchangeCode(string exchange_code)
{
EpicLoginResponse? login_response = await DoOAuthLogin("exchange_code", null, exchange_code);
if (login_response == null) // maybe we should throw an exception here
return null;
return new EpicAccount(login_response);
}
}
}
2 changes: 1 addition & 1 deletion FortniteUpdateCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static async Task<bool> IsUpToDate(string fortnite_version, string platfo
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Add("Authorization", $"bearer {client_credentials}");
string url = $"https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/v2/versioncheck/{platform}?version={HttpUtility.UrlEncode(fortnite_version)}-{platform}";
string url = $"https://fngw-mcp-gc-livefn.ol.epicgames.com/fortnite/api/v2/versioncheck/{platform}?version={HttpUtility.UrlEncode(fortnite_version)}-{platform}";
FortniteUpdateResponse? resp = await client.GetFromJsonAsync<FortniteUpdateResponse>(url);
return (resp!.type == "NO_UPDATE");
}
Expand Down

0 comments on commit 6482624

Please sign in to comment.