mirror of
https://github.com/go-gitea/gitea
synced 2025-07-25 19:58:36 +00:00
Handle refactor (#3339)
* Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
This commit is contained in:
committed by
Lauris BH
parent
45c264f681
commit
65861900cd
@@ -15,7 +15,7 @@ func SetEditorconfigIfExists(ctx *context.Context) {
|
||||
if err != nil && !git.IsErrNotExist(err) {
|
||||
description := fmt.Sprintf("Error while getting .editorconfig file: %v", err)
|
||||
if err := models.CreateRepositoryNotice(description); err != nil {
|
||||
ctx.Handle(500, "ErrCreatingReporitoryNotice", err)
|
||||
ctx.ServerError("ErrCreatingReporitoryNotice", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -47,6 +47,6 @@ func SetDiffViewStyle(ctx *context.Context) {
|
||||
|
||||
ctx.Data["IsSplitStyle"] = style == "split"
|
||||
if err := ctx.User.UpdateDiffViewStyle(style); err != nil {
|
||||
ctx.Handle(500, "ErrUpdateDiffViewStyle", err)
|
||||
ctx.ServerError("ErrUpdateDiffViewStyle", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user