Skip to content

Commit

Permalink
Use router param for filepath in GetRawFile (#19499)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Apr 26, 2022
1 parent 6cc8aed commit 3c140f0
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 3c140f0

Please sign in to comment.