diff --git a/Jellyfin.Api/Controllers/ConfigurationController.cs b/Jellyfin.Api/Controllers/ConfigurationController.cs
index 2a1dce74d4..780a38aa81 100644
--- a/Jellyfin.Api/Controllers/ConfigurationController.cs
+++ b/Jellyfin.Api/Controllers/ConfigurationController.cs
@@ -53,15 +53,15 @@ namespace Jellyfin.Api.Controllers
/// Updates application configuration.
///
/// Configuration.
- /// Configuration updated.
+ /// Configuration updated.
/// Update status.
[HttpPost("Configuration")]
[Authorize(Policy = Policies.RequiresElevation)]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult UpdateConfiguration([FromBody, BindRequired] ServerConfiguration configuration)
{
_configurationManager.ReplaceConfiguration(configuration);
- return Ok();
+ return NoContent();
}
///
@@ -81,17 +81,17 @@ namespace Jellyfin.Api.Controllers
/// Updates named configuration.
///
/// Configuration key.
- /// Named configuration updated.
+ /// Named configuration updated.
/// Update status.
[HttpPost("Configuration/{Key}")]
[Authorize(Policy = Policies.RequiresElevation)]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public async Task UpdateNamedConfiguration([FromRoute] string key)
{
var configurationType = _configurationManager.GetConfigurationType(key);
var configuration = await JsonSerializer.DeserializeAsync(Request.Body, configurationType).ConfigureAwait(false);
_configurationManager.SaveConfiguration(key, configuration);
- return Ok();
+ return NoContent();
}
///
@@ -111,15 +111,15 @@ namespace Jellyfin.Api.Controllers
/// Updates the path to the media encoder.
///
/// Media encoder path form body.
- /// Media encoder path updated.
+ /// Media encoder path updated.
/// Status.
[HttpPost("MediaEncoder/Path")]
[Authorize(Policy = Policies.FirstTimeSetupOrElevated)]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult UpdateMediaEncoderPath([FromForm, BindRequired] MediaEncoderPathDto mediaEncoderPath)
{
_mediaEncoder.UpdateEncoderPath(mediaEncoderPath.Path, mediaEncoderPath.PathType);
- return Ok();
+ return NoContent();
}
}
}
diff --git a/Jellyfin.Api/Controllers/DevicesController.cs b/Jellyfin.Api/Controllers/DevicesController.cs
index 1e75579033..1754b0cbda 100644
--- a/Jellyfin.Api/Controllers/DevicesController.cs
+++ b/Jellyfin.Api/Controllers/DevicesController.cs
@@ -105,12 +105,12 @@ namespace Jellyfin.Api.Controllers
///
/// Device Id.
/// Device Options.
- /// Device options updated.
+ /// Device options updated.
/// Device not found.
- /// An on success, or a if the device could not be found.
+ /// A on success, or a if the device could not be found.
[HttpPost("Options")]
[Authorize(Policy = Policies.RequiresElevation)]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult UpdateDeviceOptions(
[FromQuery, BindRequired] string id,
@@ -123,18 +123,18 @@ namespace Jellyfin.Api.Controllers
}
_deviceManager.UpdateDeviceOptions(id, deviceOptions);
- return Ok();
+ return NoContent();
}
///
/// Deletes a device.
///
/// Device Id.
- /// Device deleted.
+ /// Device deleted.
/// Device not found.
- /// An on success, or a if the device could not be found.
+ /// A on success, or a if the device could not be found.
[HttpDelete]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult DeleteDevice([FromQuery, BindRequired] string id)
{
var existingDevice = _deviceManager.GetDevice(id);
@@ -150,7 +150,7 @@ namespace Jellyfin.Api.Controllers
_sessionManager.Logout(session);
}
- return Ok();
+ return NoContent();
}
}
}
diff --git a/Jellyfin.Api/Controllers/NotificationsController.cs b/Jellyfin.Api/Controllers/NotificationsController.cs
index 8d82ca10f1..5af1947562 100644
--- a/Jellyfin.Api/Controllers/NotificationsController.cs
+++ b/Jellyfin.Api/Controllers/NotificationsController.cs
@@ -99,10 +99,10 @@ namespace Jellyfin.Api.Controllers
/// The description of the notification.
/// The URL of the notification.
/// The level of the notification.
- /// Notification sent.
- /// An .
+ /// Notification sent.
+ /// A .
[HttpPost("Admin")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult CreateAdminNotification(
[FromQuery] string name,
[FromQuery] string description,
@@ -121,7 +121,7 @@ namespace Jellyfin.Api.Controllers
_notificationManager.SendNotification(notification, CancellationToken.None);
- return Ok();
+ return NoContent();
}
///
@@ -129,15 +129,15 @@ namespace Jellyfin.Api.Controllers
///
/// The userID.
/// A comma-separated list of the IDs of notifications which should be set as read.
- /// Notifications set as read.
- /// An .
+ /// Notifications set as read.
+ /// A .
[HttpPost("{UserID}/Read")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult SetRead(
[FromRoute] string userId,
[FromQuery] string ids)
{
- return Ok();
+ return NoContent();
}
///
@@ -145,15 +145,15 @@ namespace Jellyfin.Api.Controllers
///
/// The userID.
/// A comma-separated list of the IDs of notifications which should be set as unread.
- /// Notifications set as unread.
- /// An .
+ /// Notifications set as unread.
+ /// A .
[HttpPost("{UserID}/Unread")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult SetUnread(
[FromRoute] string userId,
[FromQuery] string ids)
{
- return Ok();
+ return NoContent();
}
}
}
diff --git a/Jellyfin.Api/Controllers/PackageController.cs b/Jellyfin.Api/Controllers/PackageController.cs
index f37319c19e..8200f891c8 100644
--- a/Jellyfin.Api/Controllers/PackageController.cs
+++ b/Jellyfin.Api/Controllers/PackageController.cs
@@ -72,11 +72,11 @@ namespace Jellyfin.Api.Controllers
/// Package name.
/// GUID of the associated assembly.
/// Optional version. Defaults to latest version.
- /// Package found.
+ /// Package found.
/// Package not found.
- /// An on success, or a if the package could not be found.
+ /// A on success, or a if the package could not be found.
[HttpPost("/Installed/{Name}")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Authorize(Policy = Policies.RequiresElevation)]
public async Task InstallPackage(
@@ -98,23 +98,24 @@ namespace Jellyfin.Api.Controllers
await _installationManager.InstallPackage(package).ConfigureAwait(false);
- return Ok();
+ return NoContent();
}
///
/// Cancels a package installation.
///
/// Installation Id.
- /// Installation cancelled.
- /// An on successfully cancelling a package installation.
+ /// Installation cancelled.
+ /// A on successfully cancelling a package installation.
[HttpDelete("/Installing/{id}")]
[Authorize(Policy = Policies.RequiresElevation)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public IActionResult CancelPackageInstallation(
[FromRoute] [Required] string id)
{
_installationManager.CancelInstallation(new Guid(id));
- return Ok();
+ return NoContent();
}
}
}
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index 57a02e62a9..aae066e0e1 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -33,16 +33,16 @@ namespace Jellyfin.Api.Controllers
///
/// Completes the startup wizard.
///
- /// Startup wizard completed.
- /// An indicating success.
+ /// Startup wizard completed.
+ /// A indicating success.
[HttpPost("Complete")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult CompleteWizard()
{
_config.Configuration.IsStartupWizardCompleted = true;
_config.SetOptimalValues();
_config.SaveConfiguration();
- return Ok();
+ return NoContent();
}
///
@@ -70,10 +70,10 @@ namespace Jellyfin.Api.Controllers
/// The UI language culture.
/// The metadata country code.
/// The preferred language for metadata.
- /// Configuration saved.
- /// An indicating success.
+ /// Configuration saved.
+ /// A indicating success.
[HttpPost("Configuration")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult UpdateInitialConfiguration(
[FromForm] string uiCulture,
[FromForm] string metadataCountryCode,
@@ -83,7 +83,7 @@ namespace Jellyfin.Api.Controllers
_config.Configuration.MetadataCountryCode = metadataCountryCode;
_config.Configuration.PreferredMetadataLanguage = preferredMetadataLanguage;
_config.SaveConfiguration();
- return Ok();
+ return NoContent();
}
///
@@ -91,16 +91,16 @@ namespace Jellyfin.Api.Controllers
///
/// Enable remote access.
/// Enable UPnP.
- /// Configuration saved.
- /// An indicating success.
+ /// Configuration saved.
+ /// A indicating success.
[HttpPost("RemoteAccess")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult SetRemoteAccess([FromForm] bool enableRemoteAccess, [FromForm] bool enableAutomaticPortMapping)
{
_config.Configuration.EnableRemoteAccess = enableRemoteAccess;
_config.Configuration.EnableUPnP = enableAutomaticPortMapping;
_config.SaveConfiguration();
- return Ok();
+ return NoContent();
}
///
@@ -121,13 +121,13 @@ namespace Jellyfin.Api.Controllers
/// Sets the user name and password.
///
/// The DTO containing username and password.
- /// Updated user name and password.
+ /// Updated user name and password.
///
/// A that represents the asynchronous update operation.
- /// The task result contains an indicating success.
+ /// The task result contains a indicating success.
///
[HttpPost("User")]
- [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
public async Task UpdateUser([FromForm] StartupUserDto startupUserDto)
{
var user = _userManager.Users.First();
@@ -141,7 +141,7 @@ namespace Jellyfin.Api.Controllers
await _userManager.ChangePassword(user, startupUserDto.Password).ConfigureAwait(false);
}
- return Ok();
+ return NoContent();
}
}
}