Begin to impl list order, should have prereq

This commit is contained in:
bel
2019-12-01 17:51:30 -07:00
parent c756c005ac
commit 0f49595f0b
4 changed files with 7 additions and 19 deletions

View File

@@ -15,6 +15,7 @@ func (a *Ajax) loadLists(w http.ResponseWriter, r *http.Request) error {
if err != nil {
return err
}
a.ListCnt = len(lists)
return json.NewEncoder(w).Encode(map[string]interface{}{
"total": len(lists),
"list": lists,
@@ -26,6 +27,8 @@ func (a *Ajax) addList(w http.ResponseWriter, r *http.Request) error {
if err != nil {
return err
}
a.ListCnt += 1
newList.Index = a.ListCnt
if err := a.storageSetList(newList); err != nil {
return err
}
@@ -70,7 +73,7 @@ func (a *Ajax) publishList(w http.ResponseWriter, r *http.Request) error {
}
func (a *Ajax) changeListOrder(w http.ResponseWriter, r *http.Request) error {
return errors.New("not impl")
return errors.New("TODO not impl")
}
func (a *Ajax) clearCompletedInList(w http.ResponseWriter, r *http.Request) error {