aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authoraled <aled@wibblr.com>2020-06-16 19:30:00 +0100
committeraled <aled@wibblr.com>2020-06-16 19:30:23 +0100
commit05f736defb9b045ace57262d19ec3691414f8bfc (patch)
treeadd6734a2275aeaa887d459153c7bab4b18ff61a /Jellyfin.Api/Controllers/StartupController.cs
parentc722ad22ece5ee7dd68b41521c2716a50364f42a (diff)
parent100e9d586dff877610c488936aa035f61f6fedb5 (diff)
Merge branch 'master' into check-stored-password-exists
# Conflicts: # Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs
Diffstat (limited to 'Jellyfin.Api/Controllers/StartupController.cs')
-rw-r--r--Jellyfin.Api/Controllers/StartupController.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index afc9b8f3d..6ec0a4e26 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -95,10 +95,12 @@ namespace Jellyfin.Api.Controllers
[HttpGet("User")]
public StartupUserDto GetFirstUser()
{
+ // TODO: Remove this method when startup wizard no longer requires an existing user.
+ _userManager.Initialize();
var user = _userManager.Users.First();
return new StartupUserDto
{
- Name = user.Name,
+ Name = user.Username,
Password = user.Password
};
}
@@ -113,9 +115,9 @@ namespace Jellyfin.Api.Controllers
{
var user = _userManager.Users.First();
- user.Name = startupUserDto.Name;
+ user.Username = startupUserDto.Name;
- _userManager.UpdateUser(user);
+ await _userManager.UpdateUserAsync(user).ConfigureAwait(false);
if (!string.IsNullOrEmpty(startupUserDto.Password))
{