aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authorPatrick Barron <18354464+barronpm@users.noreply.github.com>2020-07-23 23:50:12 +0000
committerGitHub <noreply@github.com>2020-07-23 23:50:12 +0000
commit3d69cea1c9724210c31467bde5204c2649a23992 (patch)
treea73e7b774b0f5a7e074dedbc62ba4bf555bd3222 /Jellyfin.Api/Controllers/StartupController.cs
parent5f67ba4d7087d7a0cad37fc9e2db212340076d12 (diff)
parent845ee21ddce8ed91d8c3c1463d0d7a06bb769635 (diff)
Merge branch 'master' into displaypreferences-efcore
Diffstat (limited to 'Jellyfin.Api/Controllers/StartupController.cs')
-rw-r--r--Jellyfin.Api/Controllers/StartupController.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index 04f134b8b..93fb22c4e 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -46,14 +46,12 @@ namespace Jellyfin.Api.Controllers
[HttpGet("Configuration")]
public StartupConfigurationDto GetStartupConfiguration()
{
- var result = new StartupConfigurationDto
+ return new StartupConfigurationDto
{
UICulture = _config.Configuration.UICulture,
MetadataCountryCode = _config.Configuration.MetadataCountryCode,
PreferredMetadataLanguage = _config.Configuration.PreferredMetadataLanguage
};
-
- return result;
}
/// <summary>
@@ -92,10 +90,10 @@ namespace Jellyfin.Api.Controllers
/// </summary>
/// <returns>The first user.</returns>
[HttpGet("User")]
- public StartupUserDto GetFirstUser()
+ public async Task<StartupUserDto> GetFirstUser()
{
// TODO: Remove this method when startup wizard no longer requires an existing user.
- _userManager.Initialize();
+ await _userManager.InitializeAsync().ConfigureAwait(false);
var user = _userManager.Users.First();
return new StartupUserDto
{