mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
Return an empty array if no tasks are available
All other api endpoints also send empty arrays instead of nil. Closes #1123
This commit is contained in:
@@ -33,7 +33,7 @@ func NewList() *List {
|
||||
|
||||
// GetTasks gets complete list of tasks
|
||||
func (list *List) GetTasks() []Task {
|
||||
var tasks []Task
|
||||
tasks := []Task{}
|
||||
list.Lock()
|
||||
for _, task := range list.tasks {
|
||||
tasks = append(tasks, *task)
|
||||
|
||||
Reference in New Issue
Block a user