Use ServerError provided by Context (#14333)

... instead of InternalServerError by macaron
This commit is contained in:
Lunny Xiao
2021-01-15 04:27:22 +08:00
committed by GitHub
parent f76c30094f
commit 60a3297a33
4 changed files with 9 additions and 9 deletions

View File

@ -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") {