diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-06 15:17:57 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-06 20:07:48 +0800 |
commit | 8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0 (patch) | |
tree | a2f33fccac42b554b1176741d00c1d0cd2d0dceb /http_handle_index.go | |
parent | sql: Add purge and test scripts (diff) | |
download | forge-8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0.tar.gz forge-8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0.tar.zst forge-8ed0dbe4201a58b00d6f3743178f4cbe5328e2b0.zip |
*: Support subgroups via SQL recursion
Diffstat (limited to 'http_handle_index.go')
-rw-r--r-- | http_handle_index.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/http_handle_index.go b/http_handle_index.go index f710315..4632526 100644 --- a/http_handle_index.go +++ b/http_handle_index.go @@ -11,7 +11,7 @@ func handle_index(w http.ResponseWriter, r *http.Request, params map[string]any) var err error var groups []name_desc_t - groups, err = query_name_desc_list(r.Context(), "SELECT name, COALESCE(description, '') FROM groups") + groups, err = query_name_desc_list(r.Context(), "SELECT name, COALESCE(description, '') FROM groups WHERE parent_group IS NULL") if err != nil { http.Error(w, "Error querying groups: "+err.Error(), http.StatusInternalServerError) return |