diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-01-15 04:27:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 21:27:22 +0100 |
commit | 60a3297a33b2209ae7acf6fd84afd62e095e01aa (patch) | |
tree | 641587633e7443f02ff666c02f2b2a640634ba46 /routers/repo | |
parent | f76c30094f086162d09926a95e9a75c91177a674 (diff) | |
download | gitea-60a3297a33b2209ae7acf6fd84afd62e095e01aa.tar.gz gitea-60a3297a33b2209ae7acf6fd84afd62e095e01aa.zip |
Use ServerError provided by Context (#14333)
... instead of InternalServerError by macaron
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/issue.go | 2 | ||||
-rw-r--r-- | routers/repo/projects.go | 4 | ||||
-rw-r--r-- | routers/repo/pull.go | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 1d8d9c0366..478baf8d86 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -1117,7 +1117,7 @@ func ViewIssue(ctx *context.Context) { iw.IssueID = issue.ID iw.IsWatching, err = models.CheckIssueWatch(ctx.User, issue) if err != nil { - ctx.InternalServerError(err) + ctx.ServerError("CheckIssueWatch", err) return } } diff --git a/routers/repo/projects.go b/routers/repo/projects.go index 07327df9eb..08746aad98 100644 --- a/routers/repo/projects.go +++ b/routers/repo/projects.go @@ -355,7 +355,7 @@ func DeleteProjectBoard(ctx *context.Context) { pb, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID")) if err != nil { - ctx.InternalServerError(err) + ctx.ServerError("GetProjectBoard", err) return } if pb.ProjectID != ctx.ParamsInt64(":id") { @@ -445,7 +445,7 @@ func EditProjectBoardTitle(ctx *context.Context, form auth.EditProjectBoardTitle board, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID")) if err != nil { - ctx.InternalServerError(err) + ctx.ServerError("GetProjectBoard", err) return } if board.ProjectID != ctx.ParamsInt64(":id") { diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 1594e9a9c4..01c6efaa1d 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -713,11 +713,11 @@ func UpdatePullRequest(ctx *context.Context) { } if err := issue.PullRequest.LoadBaseRepo(); err != nil { - ctx.InternalServerError(err) + ctx.ServerError("LoadBaseRepo", err) return } if err := issue.PullRequest.LoadHeadRepo(); err != nil { - ctx.InternalServerError(err) + ctx.ServerError("LoadHeadRepo", err) return } |