aboutsummaryrefslogtreecommitdiff
path: root/handle_category_index.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-10 21:19:55 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-10 21:19:55 +0800
commit9c4f62a4a0705657404745c84d9ba9472d32def5 (patch)
tree08d4b42a2a826228af5e38b846465f745421aa65 /handle_category_index.go
parentresources: Serve source and static properly (diff)
downloadforge-9c4f62a4a0705657404745c84d9ba9472d32def5.tar.gz
forge-9c4f62a4a0705657404745c84d9ba9472d32def5.tar.zst
forge-9c4f62a4a0705657404745c84d9ba9472d32def5.zip
*: category -> group
Diffstat (limited to 'handle_category_index.go')
-rw-r--r--handle_category_index.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/handle_category_index.go b/handle_category_index.go
index f9b201c..f194cee 100644
--- a/handle_category_index.go
+++ b/handle_category_index.go
@@ -7,11 +7,11 @@ import (
"strings"
)
-func handle_category_repos(w http.ResponseWriter, r *http.Request) {
+func handle_group_repos(w http.ResponseWriter, r *http.Request) {
data := make(map[string]any)
- category_name := r.PathValue("category_name")
- data["category_name"] = category_name
- entries, err := os.ReadDir(filepath.Join(config.Git.Root, category_name))
+ group_name := r.PathValue("group_name")
+ data["group_name"] = group_name
+ entries, err := os.ReadDir(filepath.Join(config.Git.Root, group_name))
if err != nil {
_, _ = w.Write([]byte("Error listing repos: " + err.Error()))
return
@@ -26,7 +26,7 @@ func handle_category_repos(w http.ResponseWriter, r *http.Request) {
}
data["repos"] = repos
- err = templates.ExecuteTemplate(w, "category_repos", data)
+ err = templates.ExecuteTemplate(w, "group_repos", data)
if err != nil {
_, _ = w.Write([]byte("Error rendering template: " + err.Error()))
return