@ -52,16 +52,16 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// <summary>
/// Gets a single profile.
/// Gets a single profile.
/// </summary>
/// </summary>
/// <param name=" id">Profile Id.</param>
/// <param name=" prof ileI d">Profile Id.</param>
/// <response code="200">Device profile returned.</response>
/// <response code="200">Device profile returned.</response>
/// <response code="404">Device profile not found.</response>
/// <response code="404">Device profile not found.</response>
/// <returns>An <see cref="OkResult"/> containing the profile on success, or a <see cref="NotFoundResult"/> if device profile not found.</returns>
/// <returns>An <see cref="OkResult"/> containing the profile on success, or a <see cref="NotFoundResult"/> if device profile not found.</returns>
[HttpGet("Profiles/{ Id}")]
[HttpGet("Profiles/{ profile Id}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult < DeviceProfile > GetProfile ( [ FromRoute ] string id)
public ActionResult < DeviceProfile > GetProfile ( [ FromRoute ] string prof ileI d)
{
{
var profile = _dlnaManager . GetProfile ( id) ;
var profile = _dlnaManager . GetProfile ( prof ileI d) ;
if ( profile = = null )
if ( profile = = null )
{
{
return NotFound ( ) ;
return NotFound ( ) ;
@ -73,22 +73,22 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// <summary>
/// Deletes a profile.
/// Deletes a profile.
/// </summary>
/// </summary>
/// <param name=" id">Profile id.</param>
/// <param name=" prof ileI d">Profile id.</param>
/// <response code="204">Device profile deleted.</response>
/// <response code="204">Device profile deleted.</response>
/// <response code="404">Device profile not found.</response>
/// <response code="404">Device profile not found.</response>
/// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if profile not found.</returns>
/// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if profile not found.</returns>
[HttpDelete("Profiles/{ Id}")]
[HttpDelete("Profiles/{ profile Id}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult DeleteProfile ( [ FromRoute ] string id)
public ActionResult DeleteProfile ( [ FromRoute ] string prof ileI d)
{
{
var existingDeviceProfile = _dlnaManager . GetProfile ( id) ;
var existingDeviceProfile = _dlnaManager . GetProfile ( prof ileI d) ;
if ( existingDeviceProfile = = null )
if ( existingDeviceProfile = = null )
{
{
return NotFound ( ) ;
return NotFound ( ) ;
}
}
_dlnaManager . DeleteProfile ( id) ;
_dlnaManager . DeleteProfile ( prof ileI d) ;
return NoContent ( ) ;
return NoContent ( ) ;
}
}
@ -109,17 +109,17 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// <summary>
/// Updates a profile.
/// Updates a profile.
/// </summary>
/// </summary>
/// <param name=" id">Profile id.</param>
/// <param name=" prof ileI d">Profile id.</param>
/// <param name="deviceProfile">Device profile.</param>
/// <param name="deviceProfile">Device profile.</param>
/// <response code="204">Device profile updated.</response>
/// <response code="204">Device profile updated.</response>
/// <response code="404">Device profile not found.</response>
/// <response code="404">Device profile not found.</response>
/// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if profile not found.</returns>
/// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if profile not found.</returns>
[HttpPost("Profiles/{ Id}")]
[HttpPost("Profiles/{ profile Id}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult UpdateProfile ( [ FromRoute ] string id, [ FromBody ] DeviceProfile deviceProfile )
public ActionResult UpdateProfile ( [ FromRoute ] string prof ileI d, [ FromBody ] DeviceProfile deviceProfile )
{
{
var existingDeviceProfile = _dlnaManager . GetProfile ( id) ;
var existingDeviceProfile = _dlnaManager . GetProfile ( prof ileI d) ;
if ( existingDeviceProfile = = null )
if ( existingDeviceProfile = = null )
{
{
return NotFound ( ) ;
return NotFound ( ) ;