aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-08-03 11:24:13 -0600
committercrobibero <cody@robibe.ro>2020-08-03 11:24:13 -0600
commitf915c3e5d9af689a3ffe045c5d495900e562080b (patch)
treedee25d7d92f0f56d12e661261ac382b48f08772b /Jellyfin.Api/Controllers/StartupController.cs
parent6a42a48c09b8125e96daa057f755bc67ce7bac37 (diff)
parent5b4863c65b777d178f6573a8a584e2e9bac0d156 (diff)
Merge remote-tracking branch 'upstream/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
{