Workaround .net error serializing new object()

See https://github.com/dotnet/runtime/issues/61995
pull/1362/head
ta264 3 years ago
parent bc678e1976
commit 1d694af98e

@ -94,7 +94,7 @@ namespace Readarr.Api.V1.Author
_authorService.DeleteAuthor(authorId, false); _authorService.DeleteAuthor(authorId, false);
} }
return new object(); return new { };
} }
} }
} }

@ -37,7 +37,7 @@ namespace Readarr.Api.V1.Blocklist
{ {
_blocklistService.Delete(resource.Ids); _blocklistService.Delete(resource.Ids);
return new object(); return new { };
} }
} }
} }

@ -103,7 +103,7 @@ namespace Readarr.Api.V1.History
public object MarkAsFailed([FromBody] int id) public object MarkAsFailed([FromBody] int id)
{ {
_failedDownloadService.MarkAsFailed(id); _failedDownloadService.MarkAsFailed(id);
return new object(); return new { };
} }
} }
} }

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

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

@ -86,7 +86,7 @@ namespace Readarr.Api.V1.Queue
_trackedDownloadService.StopTracking(trackedDownloadIds); _trackedDownloadService.StopTracking(trackedDownloadIds);
return new object(); return new { };
} }
[HttpGet] [HttpGet]

Loading…
Cancel
Save