Fix broken buttons on download manager page

This commit is contained in:
Alex Ling
2021-01-08 11:38:51 +00:00
parent da0ca665a6
commit 0cc5e1626b
2 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -43,12 +43,14 @@ const component = () => {
this.loading = false;
});
},
jobAction(action, id) {
jobAction(action, event) {
let url = `${base_url}api/admin/mangadex/queue/${action}`;
if (id !== undefined)
url += '?' + $.param({
if (event) {
const id = event.currentTarget.closest('tr').id.split('-')[1];
url = `${url}?${$.param({
id: id
});
})}`;
}
console.log(url);
$.ajax({
type: 'POST',