mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 09:55:20 +02: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:
parent
45c264f681
commit
65861900cd
48 changed files with 622 additions and 610 deletions
|
@ -180,7 +180,7 @@ func EditMilestone(ctx *context.APIContext, form api.EditMilestoneOption) {
|
|||
}
|
||||
|
||||
if err := models.UpdateMilestone(milestone); err != nil {
|
||||
ctx.Handle(500, "UpdateMilestone", err)
|
||||
ctx.ServerError("UpdateMilestone", err)
|
||||
return
|
||||
}
|
||||
ctx.JSON(200, milestone.APIFormat())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue