Skip to content

Commit dad94eb

Browse files
jolheiserlunny6543
authored andcommitted
Use router param for filepath in GetRawFile (go-gitea#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 1d6bf0d commit dad94eb

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)