set auto-generated smartblock and playlist title directly from input

This commit is contained in:
ryan 2018-12-14 15:24:28 -06:00
parent 15b73580c1
commit 15cf291bc9
3 changed files with 53 additions and 40 deletions

View file

@ -54,7 +54,18 @@ var AIRTIME = (function (AIRTIME) {
* Generate a smartblock and playlist for this smartblock.
*/
$scope.createSmartblock = function () {
$.post(endpoint + "smartblock", {csrf_token: $("#csrf").val(), id: $scope.podcast.id}, callback);
// send smarblock creation instruction to API
$.post(
endpoint + "smartblock",
{
csrf_token: $("#csrf").val(),
id: $scope.podcast.id,
title: $scope.podcast.title
},
callback
);
// save podcast
$scope.savePodcast();
};
/**
* Close the tab and discard any changes made to the podcast data.