aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2022-04-26 12:15:45 -0500
committerGitHub <noreply@github.com>2022-04-26 12:15:45 -0500
commit3c140f0d424bc987493439eb600b221a927a933d (patch)
treed69ef53af3250743ce902a94d5496cb69729fe53 /modules
parent6cc8aed7377660e7288298af4ec4d70a43d912f2 (diff)
downloadgitea-3c140f0d424bc987493439eb600b221a927a933d.tar.gz
gitea-3c140f0d424bc987493439eb600b221a927a933d.zip
Use router param for filepath in GetRawFile (#19499)
* Use router param for filepath Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move TreePath back into RepoRefForAPI Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules')
-rw-r--r--modules/context/api.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/context/api.go b/modules/context/api.go
index 41d559f5b1..7d281b998a 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
}