diff --git a/src/Readarr.Api.V1/Author/AuthorController.cs b/src/Readarr.Api.V1/Author/AuthorController.cs index b20d976f0..37711d948 100644 --- a/src/Readarr.Api.V1/Author/AuthorController.cs +++ b/src/Readarr.Api.V1/Author/AuthorController.cs @@ -19,7 +19,6 @@ using NzbDrone.Core.Validation.Paths; using NzbDrone.Http.REST.Attributes; using NzbDrone.SignalR; using Readarr.Http; -using Readarr.Http.Extensions; using Readarr.Http.REST; namespace Readarr.Api.V1.Author @@ -143,9 +142,8 @@ namespace Readarr.Api.V1.Author } [RestPutById] - public ActionResult UpdateAuthor(AuthorResource authorResource) + public ActionResult UpdateAuthor(AuthorResource authorResource, bool moveFiles = false) { - var moveFiles = Request.GetBooleanQueryParameter("moveFiles"); var author = _authorService.GetAuthor(authorResource.Id); if (moveFiles) @@ -172,10 +170,8 @@ namespace Readarr.Api.V1.Author } [RestDeleteById] - public void DeleteAuthor(int id) + public void DeleteAuthor(int id, bool deleteFiles = false, bool addImportListExclusion = false) { - var deleteFiles = Request.GetBooleanQueryParameter("deleteFiles"); - var addImportListExclusion = Request.GetBooleanQueryParameter("addImportListExclusion"); _authorService.DeleteAuthor(id, deleteFiles, addImportListExclusion); } diff --git a/src/Readarr.Api.V1/Books/BookController.cs b/src/Readarr.Api.V1/Books/BookController.cs index 5b8281f7d..bd7762d57 100644 --- a/src/Readarr.Api.V1/Books/BookController.cs +++ b/src/Readarr.Api.V1/Books/BookController.cs @@ -19,7 +19,6 @@ using NzbDrone.Core.Validation.Paths; using NzbDrone.Http.REST.Attributes; using NzbDrone.SignalR; using Readarr.Http; -using Readarr.Http.Extensions; namespace Readarr.Api.V1.Books { @@ -176,11 +175,8 @@ namespace Readarr.Api.V1.Books } [RestDeleteById] - public void DeleteBook(int id) + public void DeleteBook(int id, bool deleteFiles = false, bool addImportListExclusion = false) { - var deleteFiles = Request.GetBooleanQueryParameter("deleteFiles"); - var addImportListExclusion = Request.GetBooleanQueryParameter("addImportListExclusion"); - _bookService.DeleteBook(id, deleteFiles, addImportListExclusion); }