aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/DevicesController.cs
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-06-12 12:38:13 +0200
committerDavid <daullmer@gmail.com>2020-06-12 12:38:13 +0200
commit043d76bd6e9e4a2e1093ae0e5ba025de1438b528 (patch)
tree52258c01ed4fa31c8422cdb5c441a456a5325f87 /Jellyfin.Api/Controllers/DevicesController.cs
parent6429e60c408c0b88edee6745c5c9c14faade3c9d (diff)
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();
}
}
}