aboutsummaryrefslogtreecommitdiff
path: root/routers/web/org/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/org/setting.go')
-rw-r--r--routers/web/org/setting.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go
index 5c9b7967c..b57ebfbcd 100644
--- a/routers/web/org/setting.go
+++ b/routers/web/org/setting.go
@@ -137,7 +137,7 @@ func SettingsPost(ctx *context.Context) {
}
for _, repo := range repos {
repo.OwnerName = org.Name
- if err := repo_service.UpdateRepository(repo, true); err != nil {
+ if err := repo_service.UpdateRepository(ctx, repo, true); err != nil {
ctx.ServerError("UpdateRepository", err)
return
}
@@ -218,9 +218,9 @@ func Webhooks(ctx *context.Context) {
ctx.Data["BaseLinkNew"] = ctx.Org.OrgLink + "/settings/hooks"
ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc")
- ws, err := webhook.ListWebhooksByOpts(ctx, &webhook.ListWebhookOptions{OrgID: ctx.Org.Organization.ID})
+ ws, err := webhook.ListWebhooksByOpts(ctx, &webhook.ListWebhookOptions{OwnerID: ctx.Org.Organization.ID})
if err != nil {
- ctx.ServerError("GetWebhooksByOrgId", err)
+ ctx.ServerError("ListWebhooksByOpts", err)
return
}
@@ -230,8 +230,8 @@ func Webhooks(ctx *context.Context) {
// DeleteWebhook response for delete webhook
func DeleteWebhook(ctx *context.Context) {
- if err := webhook.DeleteWebhookByOrgID(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil {
- ctx.Flash.Error("DeleteWebhookByOrgID: " + err.Error())
+ if err := webhook.DeleteWebhookByOwnerID(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil {
+ ctx.Flash.Error("DeleteWebhookByOwnerID: " + err.Error())
} else {
ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success"))
}