diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2024-10-29 18:27:53 +0100 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2024-10-29 18:27:53 +0100 |
| commit | dbdf2ad23a3956617a124b193a4e7f2f2a4896e6 (patch) | |
| tree | daa4e2d39100ffca84a420e0d9c3d16ff5865e2b /assets | |
| parent | dbd96c77e457ae17f55490315ffab325d2560e55 (diff) | |
| download | invidious-dbdf2ad23a3956617a124b193a4e7f2f2a4896e6.tar.gz invidious-dbdf2ad23a3956617a124b193a4e7f2f2a4896e6.tar.bz2 invidious-dbdf2ad23a3956617a124b193a4e7f2f2a4896e6.zip | |
Routes: Simplify actions in watch_ajax
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/watched_widget.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/js/watched_widget.js b/assets/js/watched_widget.js index f1ac9cb4..06af62cc 100644 --- a/assets/js/watched_widget.js +++ b/assets/js/watched_widget.js @@ -6,7 +6,7 @@ function mark_watched(target) { var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode; tile.style.display = 'none'; - var url = '/watch_ajax?action_mark_watched=1&redirect=false' + + var url = '/watch_ajax?action=mark_watched&redirect=false' + '&id=' + target.getAttribute('data-id'); helpers.xhr('POST', url, {payload: payload}, { @@ -22,7 +22,7 @@ function mark_unwatched(target) { var count = document.getElementById('count'); count.textContent--; - var url = '/watch_ajax?action_mark_unwatched=1&redirect=false' + + var url = '/watch_ajax?action=mark_unwatched&redirect=false' + '&id=' + target.getAttribute('data-id'); helpers.xhr('POST', url, {payload: payload}, { |
