Fixed a sonarr deseralization error.

This commit is contained in:
tidusjar 2017-03-18 22:14:46 +00:00
parent 2b27559277
commit 20c4ce8b7d
3 changed files with 36 additions and 8 deletions

View file

@ -864,6 +864,14 @@ namespace Ombi.UI.Modules
private async Task<Response> RequestMovie(int movieId)
{
if(string.IsNullOrEmpty(Username))
{
return Response.AsJson(new JsonResponseModel
{
Result = false,
Message = "Your session has expired, please refresh the page"
});
}
if (Security.HasPermissions(User, Permissions.ReadOnlyUser) || !Security.HasPermissions(User, Permissions.RequestMovie))
{
return
@ -1031,6 +1039,14 @@ namespace Ombi.UI.Modules
/// <returns></returns>
private async Task<Response> RequestTvShow(int showId, string seasons)
{
if (string.IsNullOrEmpty(Username))
{
return Response.AsJson(new JsonResponseModel
{
Result = false,
Message = "Your session has expired, please refresh the page"
});
}
if (Security.HasPermissions(User, Permissions.ReadOnlyUser) || !Security.HasPermissions(User, Permissions.RequestTvShow))
{
return