Implement change order endpoint

This commit is contained in:
bel
2019-12-01 17:31:30 -07:00
parent 48e8b91039
commit c756c005ac
8 changed files with 96 additions and 5 deletions

View File

@@ -16,12 +16,18 @@ func (a *Ajax) Cur(r *http.Request) (string, string, []string) {
listID := form.Get(r, "list")
taskID := form.Get(r, "id")
if listID == "" {
a.storageGet(path.Join("task", taskID, "map"), &listID)
listID, _ = a.taskIDToListID(taskID)
}
tags, _ := r.URL.Query()["t"]
return listID, taskID, tags
}
func (a *Ajax) taskIDToListID(taskID string) (string, error) {
var listID string
err := a.storageGet(path.Join("task", taskID, "map"), &listID)
return listID, err
}
func (a *Ajax) storageListLists(filters ...func(t *list.List) bool) ([]*list.List, error) {
results, err := a.DB.List(nil, path.Join("list"), path.Join("list", "}"))
if err != nil {