aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authorDavid <davidullmer@outlook.de>2020-08-03 20:22:21 +0200
committerGitHub <noreply@github.com>2020-08-03 20:22:21 +0200
commita28d00eebaec733d0c3b4e85da95c1e466189883 (patch)
tree3a1149b8f71b6ca940e0ca9acf52c0fb8b23e7e7 /Jellyfin.Api/Controllers/StartupController.cs
parent6a42a48c09b8125e96daa057f755bc67ce7bac37 (diff)
parentdbeeb7cf4a715580432232c7098e4d86afccb37c (diff)
Merge pull request #3808 from crobibero/api-migration-merge
Merge master into api-migration
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 252b5cdd1..f9e4e61b5 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -53,14 +53,12 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<StartupConfigurationDto> GetStartupConfiguration()
{
- var result = new StartupConfigurationDto
+ return new StartupConfigurationDto
{
UICulture = _config.Configuration.UICulture,
MetadataCountryCode = _config.Configuration.MetadataCountryCode,
PreferredMetadataLanguage = _config.Configuration.PreferredMetadataLanguage
};
-
- return result;
}
/// <summary>
@@ -110,10 +108,10 @@ namespace Jellyfin.Api.Controllers
[HttpGet("User")]
[HttpGet("FirstUser")]
[ProducesResponseType(StatusCodes.Status200OK)]
- public ActionResult<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
{