Unittest tasks

This commit is contained in:
Bel LaPointe
2019-11-12 14:47:33 -07:00
parent 8c4bc81694
commit ee77d9d3b7
5 changed files with 200 additions and 4 deletions

View File

@@ -49,8 +49,11 @@ func (a *Ajax) storageGetTask(listID, taskID string) (*task.Task, error) {
return &task, err
}
func (a *Ajax) storageSetTask(listID, taskID string, task *task.Task) error {
return a.storageSet(path.Join(listID, taskID), *task)
func (a *Ajax) storageSetTask(listID, taskID string, newTask *task.Task) error {
if newTask == nil {
newTask = &task.Task{}
}
return a.storageSet(path.Join(listID, taskID), *newTask)
}
func (a *Ajax) storageDelTask(listID, taskID string) error {