aboutsummaryrefslogtreecommitdiff
path: root/http_handle_group_index.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-14 09:04:07 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-14 09:04:07 +0800
commitd82a8c0c1a37f8395fc665150aa7a34da8dd974f (patch)
tree17f27e4ea942b4411085a60d5ee426afc7180e49 /http_handle_group_index.go
parent{database,http_handle_*index}.go: Reduce query_name_desc_list duplication (diff)
downloadforge-d82a8c0c1a37f8395fc665150aa7a34da8dd974f.tar.gz
forge-d82a8c0c1a37f8395fc665150aa7a34da8dd974f.tar.zst
forge-d82a8c0c1a37f8395fc665150aa7a34da8dd974f.zip
http_*.go: Abstract out render_template for deduplication
Diffstat (limited to '')
-rw-r--r--http_handle_group_index.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/http_handle_group_index.go b/http_handle_group_index.go
index 670c128..a7d0879 100644
--- a/http_handle_group_index.go
+++ b/http_handle_group_index.go
@@ -13,9 +13,5 @@ func handle_group_repos(w http.ResponseWriter, r *http.Request, params map[strin
}
params["repos"] = repos
- err = templates.ExecuteTemplate(w, "group_repos", params)
- if err != nil {
- http.Error(w, "Error rendering template: "+err.Error(), http.StatusInternalServerError)
- return
- }
+ render_template(w, "group_repos", params)
}