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