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 <[email protected]> * Move TreePath back into RepoRefForAPI Signed-off-by: jolheiser <[email protected]> Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: 6543 <[email protected]>
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

Lines changed: 1 addition & 0 deletions
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)