Add website root URL and update most links to use it

For what it's worth, I intentionally didn't include news / changelog /
supporter, because these should never change.
This commit is contained in:
Dean Herbert
2020-12-24 18:11:40 +09:00
parent eb795a2127
commit 323da82477
15 changed files with 57 additions and 24 deletions

View File

@ -28,7 +28,9 @@ namespace osu.Game.Online.API
private readonly Queue<APIRequest> queue = new Queue<APIRequest>();
public string Endpoint { get; }
public string APIEndpointUrl { get; }
public string WebsiteRootUrl { get; }
/// <summary>
/// The username/email provided by the user when initiating a login.
@ -57,9 +59,10 @@ namespace osu.Game.Online.API
{
this.config = config;
Endpoint = endpointConfiguration.APIEndpoint;
APIEndpointUrl = endpointConfiguration.APIEndpointUrl;
WebsiteRootUrl = endpointConfiguration.WebsiteRootUrl;
authentication = new OAuth(endpointConfiguration.APIClientID, endpointConfiguration.APIClientSecret, Endpoint);
authentication = new OAuth(endpointConfiguration.APIClientID, endpointConfiguration.APIClientSecret, APIEndpointUrl);
log = Logger.GetLogger(LoggingTarget.Network);
ProvidedUsername = config.Get<string>(OsuSetting.Username);
@ -245,7 +248,7 @@ namespace osu.Game.Online.API
var req = new RegistrationRequest
{
Url = $@"{Endpoint}/users",
Url = $@"{APIEndpointUrl}/users",
Method = HttpMethod.Post,
Username = username,
Email = email,