awx/src/api/models/JobTemplates.js
Michael Abashian cb50cdce0d
Add support for launching job templates from the templates list (#277)
Add support for launching job templates from the templates list
2019-06-20 15:21:57 -04:00

22 lines
452 B
JavaScript

import Base from '../Base';
class JobTemplates extends Base {
constructor (http) {
super(http);
this.baseUrl = '/api/v2/job_templates/';
this.launch = this.launch.bind(this);
this.readLaunch = this.readLaunch.bind(this);
}
launch (id, data) {
return this.http.post(`${this.baseUrl}${id}/launch/`, data);
}
readLaunch (id) {
return this.http.get(`${this.baseUrl}${id}/launch/`);
}
}
export default JobTemplates;