Add order to tasks and lists
This commit is contained in:
@@ -68,6 +68,14 @@ func (a *Ajax) makeTask(r *http.Request) (string, *task.Task, error) {
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
list, err := a.storageGetList(listID)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
task.Index = list.NextIndex()
|
||||
if err := a.storageSetList(list); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
task.AppendTags(tags)
|
||||
return listID, task, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user