From db027ed9c0ebafd9e910ca08a53860834301b1ba Mon Sep 17 00:00:00 2001 From: guosj <515878133@qq.com> Date: Sat, 26 Mar 2022 11:34:50 +0800 Subject: [PATCH 1/4] add todo list --- todo.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 todo.md diff --git a/todo.md b/todo.md new file mode 100644 index 000000000..8fa6b5fad --- /dev/null +++ b/todo.md @@ -0,0 +1,4 @@ +# TODO + +- iam api `update user` +- weed shell的自动补全机制 From 02076f01a6efd43622dc1fe9bf04c022d731719a Mon Sep 17 00:00:00 2001 From: guosj <515878133@qq.com> Date: Mon, 28 Mar 2022 14:50:48 +0800 Subject: [PATCH 2/4] fix tagging error --- weed/server/filer_server_handlers_tagging.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weed/server/filer_server_handlers_tagging.go b/weed/server/filer_server_handlers_tagging.go index 1da7ff50f..da6ecc638 100644 --- a/weed/server/filer_server_handlers_tagging.go +++ b/weed/server/filer_server_handlers_tagging.go @@ -81,8 +81,10 @@ func (fs *FilerServer) DeleteTaggingHandler(w http.ResponseWriter, r *http.Reque // parse out tags to be deleted toDelete := strings.Split(r.URL.Query().Get("tagging"), ",") deletions := make(map[string]struct{}) - for _, deletion := range toDelete { - deletions[deletion] = struct{}{} + if !(len(toDelete) == 1 && toDelete[0] == "") { + for _, deletion := range toDelete { + deletions[deletion] = struct{}{} + } } // delete all tags or specific tags From 21636c98a560c32961858b96b9f559d11dc1059a Mon Sep 17 00:00:00 2001 From: guosj <515878133@qq.com> Date: Mon, 28 Mar 2022 14:53:54 +0800 Subject: [PATCH 3/4] remove todo list --- todo.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 todo.md diff --git a/todo.md b/todo.md deleted file mode 100644 index 8fa6b5fad..000000000 --- a/todo.md +++ /dev/null @@ -1,4 +0,0 @@ -# TODO - -- iam api `update user` -- weed shell的自动补全机制 From dd2b9d93cc56f301ec2ccdeb9f9045324243c8ca Mon Sep 17 00:00:00 2001 From: guosj <515878133@qq.com> Date: Mon, 28 Mar 2022 15:23:31 +0800 Subject: [PATCH 4/4] update code according to PR's comment --- weed/server/filer_server_handlers_tagging.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/server/filer_server_handlers_tagging.go b/weed/server/filer_server_handlers_tagging.go index da6ecc638..ae2093947 100644 --- a/weed/server/filer_server_handlers_tagging.go +++ b/weed/server/filer_server_handlers_tagging.go @@ -81,8 +81,8 @@ func (fs *FilerServer) DeleteTaggingHandler(w http.ResponseWriter, r *http.Reque // parse out tags to be deleted toDelete := strings.Split(r.URL.Query().Get("tagging"), ",") deletions := make(map[string]struct{}) - if !(len(toDelete) == 1 && toDelete[0] == "") { - for _, deletion := range toDelete { + for _, deletion := range toDelete { + if deletion != "" { deletions[deletion] = struct{}{} } }