diff options
author | Unknwon <u@gogs.io> | 2017-03-19 17:44:46 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-19 17:44:46 -0400 |
commit | 2807274e2dca1780443bcbbab946b1551c4c88f5 (patch) | |
tree | 30c58a2e76e6e1338e8fd8e615d08bcd5b22d5bf /routers/api/v1 | |
parent | 55a5ad5cdcbe6906f863d0b7f27d1ee500720416 (diff) |
repo/webhook: able to retrigger delivery history (#2187)
Diffstat (limited to 'routers/api/v1')
-rw-r--r-- | routers/api/v1/repo/hook.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index ca8817dc..1fcd8735 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -12,6 +12,7 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" + "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/routers/api/v1/convert" ) @@ -106,7 +107,7 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) { func EditHook(ctx *context.APIContext, form api.EditHookOption) { w, err := models.GetWebhookOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")) if err != nil { - if models.IsErrWebhookNotExist(err) { + if errors.IsWebhookNotExist(err) { ctx.Status(404) } else { ctx.Error(500, "GetWebhookOfRepoByID", err) |