mirror of
https://github.com/Readarr/Readarr
synced 2026-05-08 12:42:51 +02:00
Fixed: Mark as Failed errors
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com> (cherry picked from commit a9792973eef960e8310a611cf1da2d2cada57532)
This commit is contained in:
parent
d01ce8b908
commit
ce58e6ecdb
4 changed files with 7 additions and 18 deletions
|
|
@ -78,12 +78,8 @@ export const actionHandlers = handleThunks({
|
||||||
} = payload;
|
} = payload;
|
||||||
|
|
||||||
const promise = createAjaxRequest({
|
const promise = createAjaxRequest({
|
||||||
url: '/history/failed',
|
url: `/history/failed/${historyId}`,
|
||||||
method: 'POST',
|
method: 'POST'
|
||||||
data: {
|
|
||||||
id: historyId
|
|
||||||
},
|
|
||||||
dataType: 'json'
|
|
||||||
}).request;
|
}).request;
|
||||||
|
|
||||||
promise.done(() => {
|
promise.done(() => {
|
||||||
|
|
|
||||||
|
|
@ -86,12 +86,8 @@ export const actionHandlers = handleThunks({
|
||||||
} = payload;
|
} = payload;
|
||||||
|
|
||||||
const promise = createAjaxRequest({
|
const promise = createAjaxRequest({
|
||||||
url: '/history/failed',
|
url: `/history/failed/${historyId}`,
|
||||||
method: 'POST',
|
method: 'POST'
|
||||||
data: {
|
|
||||||
id: historyId
|
|
||||||
},
|
|
||||||
dataType: 'json'
|
|
||||||
}).request;
|
}).request;
|
||||||
|
|
||||||
promise.done(() => {
|
promise.done(() => {
|
||||||
|
|
|
||||||
|
|
@ -246,11 +246,8 @@ export const actionHandlers = handleThunks({
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const promise = createAjaxRequest({
|
const promise = createAjaxRequest({
|
||||||
url: '/history/failed',
|
url: `/history/failed/${id}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
|
||||||
id
|
|
||||||
},
|
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
}).request;
|
}).request;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,8 @@ public List<HistoryResource> GetAuthorHistory(int authorId, int? bookId = null,
|
||||||
return _historyService.GetByAuthor(authorId, eventType).Select(h => MapToResource(h, includeAuthor, includeBook)).ToList();
|
return _historyService.GetByAuthor(authorId, eventType).Select(h => MapToResource(h, includeAuthor, includeBook)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("failed")]
|
[HttpPost("failed/{id}")]
|
||||||
public object MarkAsFailed([FromBody] int id)
|
public object MarkAsFailed([FromRoute] int id)
|
||||||
{
|
{
|
||||||
_failedDownloadService.MarkAsFailed(id);
|
_failedDownloadService.MarkAsFailed(id);
|
||||||
return new { };
|
return new { };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue