mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
Merge remote-tracking branch 'upstream/master' into HEAD
This commit is contained in:
@@ -113,8 +113,14 @@ namespace Jellyfin.Api.Controllers
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
public ActionResult<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, Password = user.Password };
|
||||
return new StartupUserDto
|
||||
{
|
||||
Name = user.Username,
|
||||
Password = user.Password
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -132,9 +138,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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user