|
|
|
@ -117,16 +117,16 @@ public class DevicesController : BaseJellyfinApiController
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes devices.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids">Device Ids.</param>
|
|
|
|
|
/// <param name="id">Device Ids.</param>
|
|
|
|
|
/// <response code="204">Device deleted.</response>
|
|
|
|
|
/// <response code="404">Device not found.</response>
|
|
|
|
|
/// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if a device could not be found.</returns>
|
|
|
|
|
[HttpDelete]
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
|
|
|
|
public async Task<ActionResult> DeleteDevice([FromQuery] string[] ids)
|
|
|
|
|
public async Task<ActionResult> DeleteDevice([FromQuery] string[] id)
|
|
|
|
|
{
|
|
|
|
|
var devices = ids.Select(_deviceManager.GetDevice).ToArray();
|
|
|
|
|
var devices = id.Select(_deviceManager.GetDevice).ToArray();
|
|
|
|
|
if (devices.Any(f => f is null))
|
|
|
|
|
{
|
|
|
|
|
return NotFound();
|
|
|
|
|