aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/hook.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user/hook.go')
-rw-r--r--routers/api/v1/user/hook.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/user/hook.go b/routers/api/v1/user/hook.go
index b4605c8a29..73c98ce746 100644
--- a/routers/api/v1/user/hook.go
+++ b/routers/api/v1/user/hook.go
@@ -63,13 +63,13 @@ func GetHook(ctx *context.APIContext) {
}
if !ctx.Doer.IsAdmin && hook.OwnerID != ctx.Doer.ID {
- ctx.NotFound()
+ ctx.APIErrorNotFound()
return
}
apiHook, err := webhook_service.ToHook(ctx.Doer.HomeLink(), hook)
if err != nil {
- ctx.InternalServerError(err)
+ ctx.APIErrorInternal(err)
return
}
ctx.JSON(http.StatusOK, apiHook)