Move function set_automark to api.js.
This commit is contained in:
parent
ba1f17da75
commit
d996101152
2 changed files with 10 additions and 4 deletions
|
@ -30,5 +30,14 @@ function refresh_all_channels(force, callback)
|
||||||
return common.post(url, data, callback);
|
return common.post(url, data, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api.channels.set_automark =
|
||||||
|
function set_automark(channel_id, state, callback)
|
||||||
|
{
|
||||||
|
var url = `/channel/${channel_id}/set_automark`;
|
||||||
|
data = new FormData();
|
||||||
|
data.append("state", state);
|
||||||
|
return common.post(url, data, callback);
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************************************************/
|
/**************************************************************************************************/
|
||||||
api.videos = {};
|
api.videos = {};
|
||||||
|
|
|
@ -481,10 +481,7 @@ function receive_action_response(response)
|
||||||
|
|
||||||
function set_automark_hook(event)
|
function set_automark_hook(event)
|
||||||
{
|
{
|
||||||
var url = "/channel/{{channel.id}}/set_automark";
|
api.channels.set_automark(CHANNEL_ID, event.target.value);
|
||||||
data = new FormData();
|
|
||||||
data.append("state", event.target.value);
|
|
||||||
return common.post(url, data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mark_video_state(video_ids, state, callback)
|
function mark_video_state(video_ids, state, callback)
|
||||||
|
|
Loading…
Reference in a new issue