mirror of
https://github.com/go-gitea/gitea
synced 2025-07-16 07:18:37 +00:00
Bug fixes for webhook API (#650)
This commit is contained in:
@@ -58,7 +58,11 @@ func DeleteHook(ctx *context.APIContext) {
|
||||
org := ctx.Org.Organization
|
||||
hookID := ctx.ParamsInt64(":id")
|
||||
if err := models.DeleteWebhookByOrgID(org.ID, hookID); err != nil {
|
||||
ctx.Error(500, "DeleteWebhookByOrgID", err)
|
||||
if models.IsErrWebhookNotExist(err) {
|
||||
ctx.Status(404)
|
||||
} else {
|
||||
ctx.Error(500, "DeleteWebhookByOrgID", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
ctx.Status(204)
|
||||
|
Reference in New Issue
Block a user