1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor error system (#33610)

This commit is contained in:
wxiaoguang
2025-02-17 14:13:17 +08:00
committed by GitHub
parent 69de5a65c2
commit f35850f48e
184 changed files with 2100 additions and 2106 deletions

View File

@@ -186,7 +186,7 @@ func SoftDeleteContentHistory(ctx *context.Context) {
return
}
if ctx.Doer == nil {
ctx.NotFound("Require SignIn", nil)
ctx.NotFound(nil)
return
}
@@ -202,12 +202,12 @@ func SoftDeleteContentHistory(ctx *context.Context) {
return
}
if history.IssueID != issue.ID {
ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{})
ctx.NotFound(issues_model.ErrCommentNotExist{})
return
}
if commentID != 0 {
if history.CommentID != commentID {
ctx.NotFound("CompareCommentID", issues_model.ErrCommentNotExist{})
ctx.NotFound(issues_model.ErrCommentNotExist{})
return
}
@@ -216,7 +216,7 @@ func SoftDeleteContentHistory(ctx *context.Context) {
return
}
if comment.IssueID != issue.ID {
ctx.NotFound("CompareIssueID", issues_model.ErrCommentNotExist{})
ctx.NotFound(issues_model.ErrCommentNotExist{})
return
}
}