From ab1a2364bece864f199526edcfd4bd96b6ba6673 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 3 Jun 2020 12:59:29 -0700 Subject: [PATCH] Move function refresh_channel to api.js. --- frontends/ycdl_flask/static/js/api.js | 9 +++++++++ frontends/ycdl_flask/templates/channel.html | 12 ++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/frontends/ycdl_flask/static/js/api.js b/frontends/ycdl_flask/static/js/api.js index a2949f3..8c12a03 100644 --- a/frontends/ycdl_flask/static/js/api.js +++ b/frontends/ycdl_flask/static/js/api.js @@ -3,5 +3,14 @@ var api = {}; /**************************************************************************************************/ api.channels = {}; +api.channels.refresh_channel = +function refresh_channel(channel_id, force, callback) +{ + var url = `/channel/${channel_id}/refresh`; + data = new FormData(); + data.append("force", force) + return common.post(url, data, callback); +} + /**************************************************************************************************/ api.videos = {}; diff --git a/frontends/ycdl_flask/templates/channel.html b/frontends/ycdl_flask/templates/channel.html index 82e4279..0057c60 100644 --- a/frontends/ycdl_flask/templates/channel.html +++ b/frontends/ycdl_flask/templates/channel.html @@ -155,8 +155,8 @@ https://stackoverflow.com/a/35153397 {{header.make_header()}}
{% if channel is not none %} - - + + All {% else %} @@ -479,14 +479,6 @@ function receive_action_response(response) } } -function refresh_channel(channel_id, force, callback) -{ - var url = `/channel/${channel_id}/refresh`; - data = new FormData(); - data.append("force", force) - return common.post(url, data, callback); -} - function set_automark_hook(event) { var url = "/channel/{{channel.id}}/set_automark";