Change InitiateQuickConnect to use POST request

Keep the GET request for compatibility
pull/8734/head
Niels van Velzen 2 years ago
parent fd73f346dc
commit 722ad3fe97

@ -52,7 +52,7 @@ namespace Jellyfin.Api.Controllers
/// <response code="200">Quick connect request successfully created.</response> /// <response code="200">Quick connect request successfully created.</response>
/// <response code="401">Quick connect is not active on this server.</response> /// <response code="401">Quick connect is not active on this server.</response>
/// <returns>A <see cref="QuickConnectResult"/> with a secret and code for future use or an error message.</returns> /// <returns>A <see cref="QuickConnectResult"/> with a secret and code for future use or an error message.</returns>
[HttpGet("Initiate")] [HttpPost("Initiate")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public async Task<ActionResult<QuickConnectResult>> InitiateQuickConnect() public async Task<ActionResult<QuickConnectResult>> InitiateQuickConnect()
{ {
@ -67,6 +67,16 @@ namespace Jellyfin.Api.Controllers
} }
} }
/// <summary>
/// Old version of <see cref="InitiateQuickConnect" /> using a GET method.
/// Still available to avoid breaking compatibility.
/// </summary>
/// <returns>The result of <see cref="InitiateQuickConnect" />.</returns>
[Obsolete("Use POST request instead")]
[HttpGet("Initiate")]
[ApiExplorerSettings(IgnoreApi = true)]
public Task<ActionResult<QuickConnectResult>> InitiateQuickConnectLegacy() => InitiateQuickConnect();
/// <summary> /// <summary>
/// Attempts to retrieve authentication information. /// Attempts to retrieve authentication information.
/// </summary> /// </summary>

Loading…
Cancel
Save