diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-14 09:04:07 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-14 09:04:07 +0800 |
commit | d82a8c0c1a37f8395fc665150aa7a34da8dd974f (patch) | |
tree | 17f27e4ea942b4411085a60d5ee426afc7180e49 /http_handle_repo_raw.go | |
parent | {database,http_handle_*index}.go: Reduce query_name_desc_list duplication (diff) | |
download | forge-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_repo_raw.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go index 1d04f6c..69a6a8c 100644 --- a/http_handle_repo_raw.go +++ b/http_handle_repo_raw.go @@ -71,9 +71,6 @@ func handle_repo_raw(w http.ResponseWriter, r *http.Request, params map[string]a params["files"] = build_display_git_tree(target) - err = templates.ExecuteTemplate(w, "repo_raw_dir", params) - if err != nil { - http.Error(w, "Error rendering template: "+err.Error(), http.StatusInternalServerError) - return - } + render_template(w, "repo_raw_dir", params) + return } |