aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/DevicesController.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-06-15 10:51:28 +0900
committerGitHub <noreply@github.com>2020-06-15 10:51:28 +0900
commite2b2f74b47cc1d281c0819795b83f8d49d1f3b09 (patch)
treecc092ac87ee82d94305ce507addd3a355b79e910 /Jellyfin.Api/Controllers/DevicesController.cs
parent293187480fb4b7bb74af80dcb8ffa1b5ccef0816 (diff)
parent9bedd9ac3ca5b5854acd6891e746bf2e7225ff21 (diff)
Merge pull request #3319 from Ullmie02/api-204
Use Http status code 204 instead of 200
Diffstat (limited to 'Jellyfin.Api/Controllers/DevicesController.cs')
-rw-r--r--Jellyfin.Api/Controllers/DevicesController.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Jellyfin.Api/Controllers/DevicesController.cs b/Jellyfin.Api/Controllers/DevicesController.cs
index 1e7557903..1754b0cbd 100644
--- a/Jellyfin.Api/Controllers/DevicesController.cs
+++ b/Jellyfin.Api/Controllers/DevicesController.cs
@@ -105,12 +105,12 @@ namespace Jellyfin.Api.Controllers
/// </summary>
/// <param name="id">Device Id.</param>
/// <param name="deviceOptions">Device Options.</param>
- /// <response code="200">Device options updated.</response>
+ /// <response code="204">Device options updated.</response>
/// <response code="404">Device not found.</response>
- /// <returns>An <see cref="OkResult"/> on success, or a <see cref="NotFoundResult"/> if the device could not be found.</returns>
+ /// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if the device could not be found.</returns>
[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();
}
/// <summary>
/// Deletes a device.
/// </summary>
/// <param name="id">Device Id.</param>
- /// <response code="200">Device deleted.</response>
+ /// <response code="204">Device deleted.</response>
/// <response code="404">Device not found.</response>
- /// <returns>An <see cref="OkResult"/> on success, or a <see cref="NotFoundResult"/> if the device could not be found.</returns>
+ /// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if the device could not be found.</returns>
[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();
}
}
}