diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index afc9b8f3da..ed1dc1ede3 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -5,6 +5,7 @@ using Jellyfin.Api.Models.StartupDtos;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library;
using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Api.Controllers
@@ -30,22 +31,28 @@ namespace Jellyfin.Api.Controllers
}
///
- /// Api endpoint for completing the startup wizard.
+ /// Completes the startup wizard.
///
+ /// Startup wizard completed.
+ /// An indicating success.
[HttpPost("Complete")]
- public void CompleteWizard()
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public ActionResult CompleteWizard()
{
_config.Configuration.IsStartupWizardCompleted = true;
_config.SetOptimalValues();
_config.SaveConfiguration();
+ return Ok();
}
///
- /// Endpoint for getting the initial startup wizard configuration.
+ /// Gets the initial startup wizard configuration.
///
- /// The initial startup wizard configuration.
+ /// Initial startup wizard configuration retrieved.
+ /// An containing the initial startup wizard configuration.
[HttpGet("Configuration")]
- public StartupConfigurationDto GetStartupConfiguration()
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public ActionResult GetStartupConfiguration()
{
var result = new StartupConfigurationDto
{
@@ -58,13 +65,16 @@ namespace Jellyfin.Api.Controllers
}
///
- /// Endpoint for updating the initial startup wizard configuration.
+ /// Sets the initial startup wizard configuration.
///
/// The UI language culture.
/// The metadata country code.
/// The preferred language for metadata.
+ /// Configuration saved.
+ /// An indicating success.
[HttpPost("Configuration")]
- public void UpdateInitialConfiguration(
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public ActionResult UpdateInitialConfiguration(
[FromForm] string uiCulture,
[FromForm] string metadataCountryCode,
[FromForm] string preferredMetadataLanguage)
@@ -73,43 +83,51 @@ namespace Jellyfin.Api.Controllers
_config.Configuration.MetadataCountryCode = metadataCountryCode;
_config.Configuration.PreferredMetadataLanguage = preferredMetadataLanguage;
_config.SaveConfiguration();
+ return Ok();
}
///
- /// Endpoint for (dis)allowing remote access and UPnP.
+ /// Sets remote access and UPnP.
///
/// Enable remote access.
/// Enable UPnP.
+ /// Configuration saved.
+ /// An indicating success.
[HttpPost("RemoteAccess")]
- public void SetRemoteAccess([FromForm] bool enableRemoteAccess, [FromForm] bool enableAutomaticPortMapping)
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public ActionResult SetRemoteAccess([FromForm] bool enableRemoteAccess, [FromForm] bool enableAutomaticPortMapping)
{
_config.Configuration.EnableRemoteAccess = enableRemoteAccess;
_config.Configuration.EnableUPnP = enableAutomaticPortMapping;
_config.SaveConfiguration();
+ return Ok();
}
///
- /// Endpoint for returning the first user.
+ /// Gets the first user.
///
+ /// Initial user retrieved.
/// The first user.
[HttpGet("User")]
- public StartupUserDto GetFirstUser()
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public ActionResult GetFirstUser()
{
var user = _userManager.Users.First();
- return new StartupUserDto
- {
- Name = user.Name,
- Password = user.Password
- };
+ return new StartupUserDto { Name = user.Name, Password = user.Password };
}
///
- /// Endpoint for updating the user name and password.
+ /// Sets the user name and password.
///
/// The DTO containing username and password.
- /// The async task.
+ /// Updated user name and password.
+ ///
+ /// A that represents the asynchronous update operation.
+ /// The task result contains an indicating success.
+ ///
[HttpPost("User")]
- public async Task UpdateUser([FromForm] StartupUserDto startupUserDto)
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public async Task UpdateUser([FromForm] StartupUserDto startupUserDto)
{
var user = _userManager.Users.First();
@@ -121,6 +139,8 @@ namespace Jellyfin.Api.Controllers
{
await _userManager.ChangePassword(user, startupUserDto.Password).ConfigureAwait(false);
}
+
+ return Ok();
}
}
}