Skip to content
Snippets Groups Projects
Commit d7e78ddb authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

#13 add taskList create endpoint

parent 3e763c87
No related branches found
No related tags found
1 merge request!8Sequential Task List executor
Pipeline #50979 passed
...@@ -168,9 +168,7 @@ func createTasks(t *TaskList, templates map[string]*task.Task) ([]*task.Task, er ...@@ -168,9 +168,7 @@ func createTasks(t *TaskList, templates map[string]*task.Task) ([]*task.Task, er
func taskNamesFromTaskListTemplate(template *Template) []string { func taskNamesFromTaskListTemplate(template *Template) []string {
var names []string var names []string
for _, group := range template.Groups { for _, group := range template.Groups {
for _, taskName := range group.Tasks { names = append(names, group.Tasks...)
names = append(names, taskName)
}
} }
return names return names
......
...@@ -21,7 +21,6 @@ const ( ...@@ -21,7 +21,6 @@ const (
tasksHistory = "tasksHistory" tasksHistory = "tasksHistory"
taskListQueue = "taskLists" taskListQueue = "taskLists"
taskListTemplates = "taskListTemplates" taskListTemplates = "taskListTemplates"
taskListHistory = "taskListsHistory"
) )
type Storage struct { type Storage struct {
...@@ -30,7 +29,6 @@ type Storage struct { ...@@ -30,7 +29,6 @@ type Storage struct {
tasksHistory *mongo.Collection tasksHistory *mongo.Collection
taskLists *mongo.Collection taskLists *mongo.Collection
taskListTemplates *mongo.Collection taskListTemplates *mongo.Collection
taskListsHistory *mongo.Collection
} }
func New(db *mongo.Client) *Storage { func New(db *mongo.Client) *Storage {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment