mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-22 13:40:37 +02:00
Remove exception handler
This commit is contained in:
parent
c5d709f77e
commit
04119c0d40
|
@ -1,6 +1,5 @@
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MediaBrowser.Controller.Net;
|
using MediaBrowser.Controller.Net;
|
||||||
|
@ -44,8 +43,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
[FromRoute] string displayPreferencesId,
|
[FromRoute] string displayPreferencesId,
|
||||||
[FromQuery] [Required] string userId,
|
[FromQuery] [Required] string userId,
|
||||||
[FromQuery] [Required] string client)
|
[FromQuery] [Required] string client)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
var result = _displayPreferencesRepository.GetDisplayPreferences(displayPreferencesId, userId, client);
|
var result = _displayPreferencesRepository.GetDisplayPreferences(displayPreferencesId, userId, client);
|
||||||
if (result == null)
|
if (result == null)
|
||||||
|
@ -55,11 +52,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
|
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
return StatusCode(StatusCodes.Status500InternalServerError, e.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update Display Preferences.
|
/// Update Display Preferences.
|
||||||
|
@ -79,8 +71,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
[FromQuery, BindRequired] string userId,
|
[FromQuery, BindRequired] string userId,
|
||||||
[FromQuery, BindRequired] string client,
|
[FromQuery, BindRequired] string client,
|
||||||
[FromBody, BindRequired] DisplayPreferences displayPreferences)
|
[FromBody, BindRequired] DisplayPreferences displayPreferences)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
{
|
{
|
||||||
|
@ -100,10 +90,5 @@ namespace Jellyfin.Api.Controllers
|
||||||
|
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
return StatusCode(StatusCodes.Status500InternalServerError, e.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue