update current workflow copy implementation to be compatible with recent api changes

This commit is contained in:
Jake McDermott
2017-12-02 22:02:52 -05:00
parent 605a2c7e01
commit 894f0cf2c5

View File

@@ -61,13 +61,16 @@
Rest.setUrl(url); Rest.setUrl(url);
return Rest.get(); return Rest.get();
}, },
copyWorkflow: function(id) { getWorkflowCopyName: function(baseName) {
return `${baseName}@${moment().format('h:mm:ss a')}`;
},
copyWorkflow: function(id, name) {
let url = GetBasePath('workflow_job_templates'); let url = GetBasePath('workflow_job_templates');
url = url + id + '/copy'; url = url + id + '/copy';
Rest.setUrl(url); Rest.setUrl(url);
return Rest.post(); return Rest.post({ name });
} }
}; };
} }