Skip to content

Commit 3c140f0

Browse files
jolheiserlunny6543
authored
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>
1 parent 6cc8aed commit 3c140f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/context/api.go

+1
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ func RepoRefForAPI(next http.Handler) http.Handler {
362362
return
363363
}
364364
ctx.Repo.Commit = commit
365+
ctx.Repo.TreePath = ctx.Params("*")
365366
return
366367
}
367368

0 commit comments

Comments
 (0)