diff options
| author | crobibero <cody@robibe.ro> | 2020-06-17 10:43:04 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-06-17 10:43:04 -0600 |
| commit | 444605703c91bafdcf1a01d864b7b71bd2a67ddb (patch) | |
| tree | 1eea5b066befbb58eb9ac514bd2c358358fda71c /Jellyfin.Api/Controllers/PackageController.cs | |
| parent | 8a834fb7285681e5a8f3df57e4aac36724c0bc1e (diff) | |
| parent | cf9223b8cb2f1ebccf20cb1dcd99d19b78cf3e61 (diff) | |
Merge remote-tracking branch 'upstream/api-migration' into api-filter
Diffstat (limited to 'Jellyfin.Api/Controllers/PackageController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/PackageController.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Jellyfin.Api/Controllers/PackageController.cs b/Jellyfin.Api/Controllers/PackageController.cs index f37319c19..8200f891c 100644 --- a/Jellyfin.Api/Controllers/PackageController.cs +++ b/Jellyfin.Api/Controllers/PackageController.cs @@ -72,11 +72,11 @@ namespace Jellyfin.Api.Controllers /// <param name="name">Package name.</param> /// <param name="assemblyGuid">GUID of the associated assembly.</param> /// <param name="version">Optional version. Defaults to latest version.</param> - /// <response code="200">Package found.</response> + /// <response code="204">Package found.</response> /// <response code="404">Package not found.</response> - /// <returns>An <see cref="OkResult"/> on success, or a <see cref="NotFoundResult"/> if the package could not be found.</returns> + /// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if the package could not be found.</returns> [HttpPost("/Installed/{Name}")] - [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status404NotFound)] [Authorize(Policy = Policies.RequiresElevation)] public async Task<ActionResult> InstallPackage( @@ -98,23 +98,24 @@ namespace Jellyfin.Api.Controllers await _installationManager.InstallPackage(package).ConfigureAwait(false); - return Ok(); + return NoContent(); } /// <summary> /// Cancels a package installation. /// </summary> /// <param name="id">Installation Id.</param> - /// <response code="200">Installation cancelled.</response> - /// <returns>An <see cref="OkResult"/> on successfully cancelling a package installation.</returns> + /// <response code="204">Installation cancelled.</response> + /// <returns>A <see cref="NoContentResult"/> on successfully cancelling a package installation.</returns> [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(); } } } |
