aboutsummaryrefslogtreecommitdiff
path: root/handle_repo_raw.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-12 11:01:52 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-12 11:01:52 +0800
commit88d054811df785b92b1b76dd91265849af8f29b3 (patch)
tree522a9175290322cbe615ba98acf07a8a81888fcc /handle_repo_raw.go
parentgit_format_patch.go: Remove garbage printf (diff)
downloadforge-88d054811df785b92b1b76dd91265849af8f29b3.tar.gz
forge-88d054811df785b92b1b76dd91265849af8f29b3.tar.zst
forge-88d054811df785b92b1b76dd91265849af8f29b3.zip
*: Migrate to the new path scheme
Diffstat (limited to 'handle_repo_raw.go')
-rw-r--r--handle_repo_raw.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/handle_repo_raw.go b/handle_repo_raw.go
index 7ed3842..d335f6a 100644
--- a/handle_repo_raw.go
+++ b/handle_repo_raw.go
@@ -9,10 +9,10 @@ import (
"github.com/go-git/go-git/v5/plumbing/object"
)
-func handle_repo_raw(w http.ResponseWriter, r *http.Request) {
+func handle_repo_raw(w http.ResponseWriter, r *http.Request, params map[string]string) {
data := make(map[string]any)
- raw_path_spec := r.PathValue("rest")
- group_name, repo_name, path_spec := r.PathValue("group_name"), r.PathValue("repo_name"), strings.TrimSuffix(raw_path_spec, "/")
+ raw_path_spec := params["rest"]
+ group_name, repo_name, path_spec := params["group_name"], params["repo_name"], strings.TrimSuffix(raw_path_spec, "/")
ref_type, ref_name, err := get_param_ref_and_type(r)
if err != nil {