Skip to content

The Free Software Media System - Server Backend & API

Merge remote-tracking branch 'upstream/master' into HEAD

crobibero589735f60ce3
diff --cc Jellyfin.Api/Controllers/StartupController.cs
index aae066e0e1,6ec0a4e26f..d96b0f9934
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@@ -104,17 -89,20 +104,23 @@@ namespace Jellyfin.Api.Controller
}
/// <summary>
- /// Endpoint for returning the first user.
+ /// Gets the first user.
/// </summary>
+ /// <response code="200">Initial user retrieved.</response>
/// <returns>The first user.</returns>
[HttpGet("User")]
- public StartupUserDto GetFirstUser()
+ [HttpGet("FirstUser")]
+ [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>