From 3c140f0d424bc987493439eb600b221a927a933d Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 26 Apr 2022 12:15:45 -0500 Subject: [PATCH] Use router param for filepath in GetRawFile (#19499) * Use router param for filepath Signed-off-by: jolheiser * Move TreePath back into RepoRefForAPI Signed-off-by: jolheiser Co-authored-by: Lunny Xiao Co-authored-by: 6543 <6543@obermui.de> --- modules/context/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/context/api.go b/modules/context/api.go index 41d559f5b..7d281b998 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -362,6 +362,7 @@ func RepoRefForAPI(next http.Handler) http.Handler { return } ctx.Repo.Commit = commit + ctx.Repo.TreePath = ctx.Params("*") return }