linting fixes

This commit is contained in:
Daniel Sami 2018-10-31 11:22:31 -04:00 committed by Jake McDermott
parent 5da13683ce
commit e152b30fc1
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7

View File

@ -153,7 +153,7 @@ const getTeam = (namespace = session) => getOrganization(namespace)
}));
const getSmartInventory = (namespace = session) => getOrganization(namespace)
.then(organization => getOrCreate(`/inventories/`, {
.then(organization => getOrCreate('/inventories/', {
name: `${namespace}-smart-inventory`,
description: namespace,
organization: organization.id,
@ -218,15 +218,6 @@ const getUpdatedProject = (namespace = session) => getProject(namespace)
return project;
});
const getJob = (namespace = session) => getJobTemplate(namespace)
.then(template => {
const launchURL = template.related.launch;
return post(launchURL, {}).then(response => {
const jobURL = response.data.url;
return waitForJob(jobURL).then(() => response.data);
});
});
const getJobTemplate = (namespace = session) => {
const promises = [
getInventory(namespace),
@ -245,8 +236,16 @@ const getJobTemplate = (namespace = session) => {
}));
};
const getWorkflowTemplate = (namespace = session) => {
const getJob = (namespace = session) => getJobTemplate(namespace)
.then(template => {
const launchURL = template.related.launch;
return post(launchURL, {}).then(response => {
const jobURL = response.data.url;
return waitForJob(jobURL).then(() => response.data);
});
});
const getWorkflowTemplate = (namespace = session) => {
const workflowTemplatePromise = getOrganization(namespace)
.then(organization => getOrCreate(`/organizations/${organization.id}/workflow_job_templates/`, {
name: `${namespace}-workflow-template`,