mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-25 14:25:45 +01:00
be0fc0b324
- Updated Readme - Nicer overview of a playbook
21 lines
433 B
JavaScript
21 lines
433 B
JavaScript
define(['app'], function (app) {
|
|
app.registerFactory('Task', ['$http', function ($http) {
|
|
var Task = function (id) {
|
|
if (!id) {
|
|
return;
|
|
}
|
|
|
|
this.id = id;
|
|
}
|
|
|
|
Task.prototype.delete = function (playbook, job) {
|
|
return $http.delete('/playbook/'+playbook.data._id+'/job/'+job._id+'/task/'+this.data._id);
|
|
}
|
|
|
|
Task.prototype.get = function () {
|
|
return $http.get('/task/'+this.id);
|
|
}
|
|
|
|
return Task;
|
|
}])
|
|
}) |