diff options
Diffstat (limited to 'routers/api/v1/utils/hook.go')
-rw-r--r-- | routers/api/v1/utils/hook.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/utils/hook.go b/routers/api/v1/utils/hook.go index aef9b8f4ce..1f0a35ce22 100644 --- a/routers/api/v1/utils/hook.go +++ b/routers/api/v1/utils/hook.go @@ -75,7 +75,7 @@ func AddOrgHook(ctx *context.APIContext, form *api.CreateHookOption) { org := ctx.Org.Organization hook, ok := addHook(ctx, form, org.ID, 0) if ok { - ctx.JSON(http.StatusCreated, convert.ToHook(org.HomeLink(), hook)) + ctx.JSON(http.StatusCreated, convert.ToHook(org.AsUser().HomeLink(), hook)) } } @@ -185,7 +185,7 @@ func EditOrgHook(ctx *context.APIContext, form *api.EditHookOption, hookID int64 if err != nil { return } - ctx.JSON(http.StatusOK, convert.ToHook(org.HomeLink(), updated)) + ctx.JSON(http.StatusOK, convert.ToHook(org.AsUser().HomeLink(), updated)) } // EditRepoHook edit webhook `w` according to `form`. Writes to `ctx` accordingly |