fix: SettingsEnum casing

This commit is contained in:
CyberL1 2024-05-23 21:53:05 +02:00
parent 412e842905
commit c9471f66c6
4 changed files with 7 additions and 7 deletions

View File

@ -2,9 +2,9 @@
{ {
public enum SettingsEnum public enum SettingsEnum
{ {
newsLink, NewsLink,
defaultServerAddress, DefaultServerAddress,
trialMode, TrialMode,
workMode WorkMode
} }
} }

View File

@ -35,7 +35,7 @@ namespace Minecraft_Realms_Emulator.Modes.External.Controllers
public ActionResult<NewsResponse> GetNews() public ActionResult<NewsResponse> GetNews()
{ {
var config = new ConfigHelper(_context); var config = new ConfigHelper(_context);
var newsLink = config.GetSetting(nameof(SettingsEnum.newsLink)); var newsLink = config.GetSetting(nameof(SettingsEnum.NewsLink));
var news = new NewsResponse var news = new NewsResponse
{ {

View File

@ -22,7 +22,7 @@ namespace Minecraft_Realms_Emulator.Modes.External.Controllers
public ActionResult<bool> GetTrial() public ActionResult<bool> GetTrial()
{ {
var config = new ConfigHelper(_context); var config = new ConfigHelper(_context);
var trialMode = config.GetSetting(nameof(SettingsEnum.trialMode)); var trialMode = config.GetSetting(nameof(SettingsEnum.TrialMode));
return Ok(trialMode.Value); return Ok(trialMode.Value);
} }

View File

@ -52,7 +52,7 @@ var db = scope.ServiceProvider.GetRequiredService<DataContext>();
app.MapControllers(); app.MapControllers();
var config = new ConfigHelper(db); var config = new ConfigHelper(db);
var mode = config.GetSetting(nameof(SettingsEnum.workMode)); var mode = config.GetSetting(nameof(SettingsEnum.WorkMode));
if (mode == null) if (mode == null)
{ {