aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/commit.go')
-rw-r--r--routers/web/repo/commit.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go
index 7b5e72593f..dae6063908 100644
--- a/routers/web/repo/commit.go
+++ b/routers/web/repo/commit.go
@@ -257,12 +257,12 @@ func FileHistory(ctx *context.Context) {
}
func LoadBranchesAndTags(ctx *context.Context) {
- response, err := git_service.LoadBranchesAndTags(ctx, ctx.Repo, ctx.Params("sha"))
+ response, err := git_service.LoadBranchesAndTags(ctx, ctx.Repo, ctx.PathParam("sha"))
if err == nil {
ctx.JSON(http.StatusOK, response)
return
}
- ctx.NotFoundOrServerError(fmt.Sprintf("could not load branches and tags the commit %s belongs to", ctx.Params("sha")), git.IsErrNotExist, err)
+ ctx.NotFoundOrServerError(fmt.Sprintf("could not load branches and tags the commit %s belongs to", ctx.PathParam("sha")), git.IsErrNotExist, err)
}
// Diff show different from current commit to previous commit
@@ -271,7 +271,7 @@ func Diff(ctx *context.Context) {
userName := ctx.Repo.Owner.Name
repoName := ctx.Repo.Repository.Name
- commitID := ctx.Params(":sha")
+ commitID := ctx.PathParam(":sha")
var (
gitRepo *git.Repository
err error
@@ -420,13 +420,13 @@ func RawDiff(ctx *context.Context) {
}
if err := git.GetRawDiff(
gitRepo,
- ctx.Params(":sha"),
- git.RawDiffType(ctx.Params(":ext")),
+ ctx.PathParam(":sha"),
+ git.RawDiffType(ctx.PathParam(":ext")),
ctx.Resp,
); err != nil {
if git.IsErrNotExist(err) {
ctx.NotFound("GetRawDiff",
- errors.New("commit "+ctx.Params(":sha")+" does not exist."))
+ errors.New("commit "+ctx.PathParam(":sha")+" does not exist."))
return
}
ctx.ServerError("GetRawDiff", err)