|
|
@ -207,8 +207,8 @@ func (l *Loader) FindProject(ctx context.Context, id string) (*models.ProjectRes |
|
|
|
} |
|
|
|
|
|
|
|
logs, err := l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
IDs: taskIDs, |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
TaskIDs: taskIDs, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -270,8 +270,8 @@ func (l *Loader) ListProjects(ctx context.Context, filter models.ProjectFilter) |
|
|
|
} |
|
|
|
|
|
|
|
logs, err := l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
IDs: taskIDs, |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
TaskIDs: taskIDs, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -331,8 +331,8 @@ func (l *Loader) FindTask(ctx context.Context, id string) (*models.TaskResult, e |
|
|
|
result.Item, _ = l.DB.Items().Find(ctx, task.ItemID) |
|
|
|
result.Project, _ = l.DB.Projects().Find(ctx, task.ProjectID) |
|
|
|
result.Logs, err = l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: task.UserID, |
|
|
|
IDs: []string{task.ID}, |
|
|
|
UserID: task.UserID, |
|
|
|
TaskIDs: []string{task.ID}, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -363,8 +363,8 @@ func (l *Loader) ListTasks(ctx context.Context, filter models.TaskFilter) ([]*mo |
|
|
|
} |
|
|
|
|
|
|
|
logs, err := l.DB.Logs().List(ctx, models.LogFilter{ |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
IDs: taskIDs, |
|
|
|
UserID: auth.UserID(ctx), |
|
|
|
TaskIDs: taskIDs, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
@ -394,7 +394,7 @@ func (l *Loader) ListTasks(ctx context.Context, filter models.TaskFilter) ([]*mo |
|
|
|
} |
|
|
|
|
|
|
|
for _, log := range logs { |
|
|
|
if log.TaskID != task.ID { |
|
|
|
if log.TaskID == task.ID { |
|
|
|
result.Logs = append(result.Logs, log) |
|
|
|
} |
|
|
|
} |
|
|
|