aboutsummaryrefslogtreecommitdiff
path: root/http_handle_index.go
diff options
context:
space:
mode:
Diffstat (limited to 'http_handle_index.go')
-rw-r--r--http_handle_index.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/http_handle_index.go b/http_handle_index.go
index 144e9ab..2fc99a6 100644
--- a/http_handle_index.go
+++ b/http_handle_index.go
@@ -10,11 +10,11 @@ import (
"github.com/dustin/go-humanize"
)
-func handle_index(w http.ResponseWriter, r *http.Request, params map[string]any) {
+func httpHandleIndex(w http.ResponseWriter, r *http.Request, params map[string]any) {
var err error
- var groups []name_desc_t
+ var groups []nameDesc
- groups, err = query_name_desc_list(r.Context(), "SELECT name, COALESCE(description, '') FROM groups WHERE parent_group IS NULL")
+ groups, err = queryNameDesc(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
@@ -25,5 +25,5 @@ func handle_index(w http.ResponseWriter, r *http.Request, params map[string]any)
memstats := runtime.MemStats{}
runtime.ReadMemStats(&memstats)
params["mem"] = humanize.IBytes(memstats.Alloc)
- render_template(w, "index", params)
+ renderTemplate(w, "index", params)
}