mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +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
@@ -193,7 +193,7 @@ func EditLabel(ctx *context.APIContext, form api.EditLabelOption) {
|
||||
label.Color = *form.Color
|
||||
}
|
||||
if err := models.UpdateLabel(label); err != nil {
|
||||
ctx.Handle(500, "UpdateLabel", err)
|
||||
ctx.ServerError("UpdateLabel", err)
|
||||
return
|
||||
}
|
||||
ctx.JSON(200, label.APIFormat())
|
||||
|
Reference in New Issue
Block a user