Workaround .net error serializing new object()

See https://github.com/dotnet/runtime/issues/61995
This commit is contained in:
ta264 2021-12-01 21:28:41 +00:00
parent e139708bb2
commit cdde7d4d8b
7 changed files with 9 additions and 8 deletions

View File

@ -49,7 +49,7 @@ namespace Radarr.Api.V3.Blocklist
{
_blocklistService.Delete(resource.Ids);
return new object();
return new { };
}
}
}

View File

@ -98,7 +98,7 @@ namespace Radarr.Api.V3.History
public object MarkAsFailed([FromRoute] int id)
{
_failedDownloadService.MarkAsFailed(id);
return new object();
return new { };
}
}
}

View File

@ -187,7 +187,7 @@ namespace Radarr.Api.V3.MovieFiles
_mediaFileDeletionService.DeleteMovieFile(movie, movieFile);
}
return new object();
return new { };
}
[NonAction]

View File

@ -94,7 +94,7 @@ namespace Radarr.Api.V3.Movies
{
_movieService.DeleteMovies(resource.MovieIds, resource.DeleteFiles, resource.AddImportExclusion);
return new object();
return new { };
}
}
}

View File

@ -103,9 +103,10 @@ namespace Radarr.Api.V3
}
[RestDeleteById]
public void DeleteProvider(int id)
public object DeleteProvider(int id)
{
_providerFactory.Delete(id);
return new { };
}
[HttpGet("schema")]

View File

@ -31,7 +31,7 @@ namespace Radarr.Api.V3.Queue
_downloadService.DownloadReport(pendingRelease.RemoteMovie);
return new object();
return new { };
}
[HttpPost("grab/bulk")]
@ -49,7 +49,7 @@ namespace Radarr.Api.V3.Queue
_downloadService.DownloadReport(pendingRelease.RemoteMovie);
}
return new object();
return new { };
}
}
}

View File

@ -91,7 +91,7 @@ namespace Radarr.Api.V3.Queue
_trackedDownloadService.StopTracking(trackedDownloadIds);
return new object();
return new { };
}
[HttpGet]