Skip to content

Commit

Permalink
Fix purge chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoHeichou committed Sep 1, 2024
1 parent 10f678f commit d5d2813
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/js/admin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"/js/bootstrap.js": "/js/bootstrap.js?id=3b776dfb35160f65ced652e6fcb14c12",
"/css/app.css": "/css/app.css?id=9fe9320ac62fc1194d5c434cdb8a65d1",
"/js/reader.js": "/js/reader.js?id=7422be885f7a1f1361f3593fff2f136f",
"/js/admin.js": "/js/admin.js?id=5bb633a8887e7f71561c70a405874c1d",
"/js/admin.js": "/js/admin.js?id=57e89fc1374a0b2701a1e0063ad1da01",
"/css/reader.css": "/css/reader.css?id=ed305ad736360e562fa77282bc43a78f",
"/css/admin.css": "/css/admin.css?id=6d3204901a82b12d8139a241c81476f1",
"/img/404.gif": "/img/404.gif?id=fcd2fae8d068446598426368758161bf",
Expand Down
4 changes: 2 additions & 2 deletions resources/js/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ const purgeChapter = function (url) {
redirect: 'follow'
}
showNotification('Running purge...', 'warning');
fetch(`${API_BASE_URL}${url}`, init).then(res => showNotification('Reader purged:', res.status === 200 ? 'success' : 'error'));
const ch_slug = url.split('/', 3)[2];
fetch(url, init).then(res => showNotification('Reader purged:', res.status === 200 ? 'success' : 'error'));
const ch_slug = url.substr(BASE_URL.length).split('/', 2)[1];
fetch(`${API_BASE_URL}/comics/${ch_slug}`, init).then(res => showNotification('Comic purged:', res.status === 200 ? 'success' : 'error'));
fetch(`${API_BASE_URL}/comics`, init).then(res => showNotification('Comics purged:', res.status === 200 ? 'success' : 'error'));
fetch(`${API_BASE_URL}/recommended`, init).then(res => showNotification('Recommended purged:', res.status === 200 ? 'success' : 'error'));
Expand Down

0 comments on commit d5d2813

Please sign in to comment.