Skip to content

Commit

Permalink
Use router param for filepath in GetRawFile (go-gitea#19499)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored and AbdulrhmnGhanem committed Aug 23, 2022
1 parent 1d6bf0d commit dad94eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/context/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ func RepoRefForAPI(next http.Handler) http.Handler {
return
}
ctx.Repo.Commit = commit
ctx.Repo.TreePath = ctx.Params("*")
return
}

Expand Down

0 comments on commit dad94eb

Please sign in to comment.