From 0943a41f5947af4ef6a9eb244d4fb949f92f75fc Mon Sep 17 00:00:00 2001 From: sim1222 Date: Thu, 22 Dec 2022 23:42:12 +0900 Subject: [PATCH] fix: edit endpointUrl --- ...ration.cs => DevelopmentEndpointConfigration.cs} | 4 ++-- .../MisskeyAPI/ProductionEndpointConfigration.cs | 13 +++++++++++++ osu.Game/OsuGameBase.cs | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) rename osu.Game/Online/MisskeyAPI/{DefaultEndpointConfigration.cs => DevelopmentEndpointConfigration.cs} (69%) create mode 100644 osu.Game/Online/MisskeyAPI/ProductionEndpointConfigration.cs diff --git a/osu.Game/Online/MisskeyAPI/DefaultEndpointConfigration.cs b/osu.Game/Online/MisskeyAPI/DevelopmentEndpointConfigration.cs similarity index 69% rename from osu.Game/Online/MisskeyAPI/DefaultEndpointConfigration.cs rename to osu.Game/Online/MisskeyAPI/DevelopmentEndpointConfigration.cs index 1dd9cabcb1..97cf06d4f4 100644 --- a/osu.Game/Online/MisskeyAPI/DefaultEndpointConfigration.cs +++ b/osu.Game/Online/MisskeyAPI/DevelopmentEndpointConfigration.cs @@ -3,9 +3,9 @@ namespace osu.Game.Online.MisskeyAPI { - public class DefaultEndpointConfigration : EndpointConfiguration + public class DevelopmentEndpointConfigration : EndpointConfiguration { - public DefaultEndpointConfigration() + public DevelopmentEndpointConfigration() { APIEndpointUrl = "https://simkey.net"; } diff --git a/osu.Game/Online/MisskeyAPI/ProductionEndpointConfigration.cs b/osu.Game/Online/MisskeyAPI/ProductionEndpointConfigration.cs new file mode 100644 index 0000000000..daf0ab902c --- /dev/null +++ b/osu.Game/Online/MisskeyAPI/ProductionEndpointConfigration.cs @@ -0,0 +1,13 @@ +// Copyright (c) sim1222 . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace osu.Game.Online.MisskeyAPI +{ + public class ProductionEndpointConfigration : EndpointConfiguration + { + public ProductionEndpointConfigration() + { + APIEndpointUrl = "https://misskey.io"; + } + } +} diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 98a9434392..23f7b5ad8c 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -100,7 +100,7 @@ namespace osu.Game UseDevelopmentServer ? new DevelopmentEndpointConfiguration() : new ProductionEndpointConfiguration(); internal Online.MisskeyAPI.EndpointConfiguration CreateMisskeyEndpoints() => - new osu.Game.Online.MisskeyAPI.DefaultEndpointConfigration(); + UseDevelopmentServer ? new osu.Game.Online.MisskeyAPI.DevelopmentEndpointConfigration() : new osu.Game.Online.MisskeyAPI.ProductionEndpointConfigration(); public virtual Version AssemblyVersion => Assembly.GetEntryAssembly()?.GetName().Version ?? new Version();