From afcc33b76bd0eb8dca2256f292af3efd4a89849e Mon Sep 17 00:00:00 2001 From: bel Date: Mon, 20 Jan 2020 21:33:44 -0700 Subject: [PATCH] fix show completed --- server/ajax/task.go | 2 +- testdata/migrate.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/ajax/task.go b/server/ajax/task.go index 03afe3a..57085e0 100755 --- a/server/ajax/task.go +++ b/server/ajax/task.go @@ -31,7 +31,7 @@ func (a *Ajax) loadTasks(w http.ResponseWriter, r *http.Request) error { func filterComplete(compl string) func(t *task.Task) bool { return func(t *task.Task) bool { - return compl == "" || (compl == "0" && !t.Complete) || (compl == "1" && t.Complete) + return compl == "" || !t.Complete || (compl == "1" && t.Complete) } } diff --git a/testdata/migrate.sh b/testdata/migrate.sh index 70db8c6..73db091 100755 --- a/testdata/migrate.sh +++ b/testdata/migrate.sh @@ -114,6 +114,6 @@ function b64decode() { } if [ "$0" == "$BASH_SOURCE" ]; then - echo bash migrate.sh 192.168.0.86:44112 localhost:39909 + echo bash migrate.sh 192.168.0.86:44112 localhost:38809 time main "$@" fi