diff --git a/frontend/src/Store/Actions/authorHistoryActions.js b/frontend/src/Store/Actions/authorHistoryActions.js index f22374ab3..2b1c53edc 100644 --- a/frontend/src/Store/Actions/authorHistoryActions.js +++ b/frontend/src/Store/Actions/authorHistoryActions.js @@ -78,12 +78,8 @@ export const actionHandlers = handleThunks({ } = payload; const promise = createAjaxRequest({ - url: '/history/failed', - method: 'POST', - data: { - id: historyId - }, - dataType: 'json' + url: `/history/failed/${historyId}`, + method: 'POST' }).request; promise.done(() => { diff --git a/frontend/src/Store/Actions/bookHistoryActions.js b/frontend/src/Store/Actions/bookHistoryActions.js index aecea42f4..9726c7aef 100644 --- a/frontend/src/Store/Actions/bookHistoryActions.js +++ b/frontend/src/Store/Actions/bookHistoryActions.js @@ -86,12 +86,8 @@ export const actionHandlers = handleThunks({ } = payload; const promise = createAjaxRequest({ - url: '/history/failed', - method: 'POST', - data: { - id: historyId - }, - dataType: 'json' + url: `/history/failed/${historyId}`, + method: 'POST' }).request; promise.done(() => { diff --git a/frontend/src/Store/Actions/historyActions.js b/frontend/src/Store/Actions/historyActions.js index 71b99b63b..0f778f5b4 100644 --- a/frontend/src/Store/Actions/historyActions.js +++ b/frontend/src/Store/Actions/historyActions.js @@ -246,11 +246,8 @@ export const actionHandlers = handleThunks({ })); const promise = createAjaxRequest({ - url: '/history/failed', + url: `/history/failed/${id}`, method: 'POST', - data: { - id - }, dataType: 'json' }).request; diff --git a/src/Readarr.Api.V1/History/HistoryController.cs b/src/Readarr.Api.V1/History/HistoryController.cs index 77b04cd1e..656efc296 100644 --- a/src/Readarr.Api.V1/History/HistoryController.cs +++ b/src/Readarr.Api.V1/History/HistoryController.cs @@ -99,8 +99,8 @@ namespace Readarr.Api.V1.History return _historyService.GetByAuthor(authorId, eventType).Select(h => MapToResource(h, includeAuthor, includeBook)).ToList(); } - [HttpPost("failed")] - public object MarkAsFailed([FromBody] int id) + [HttpPost("failed/{id}")] + public object MarkAsFailed([FromRoute] int id) { _failedDownloadService.MarkAsFailed(id); return new { };