summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorJames Lakin <jamesorlakin@users.noreply.github.com>2020-03-01 16:51:55 +0000
committerGitHub <noreply@github.com>2020-03-01 11:51:55 -0500
commitc08c975d368771237d6509df915d3ec315186612 (patch)
tree562ae170bc69ca1d02a5b8022766133be052fcdb /routers
parentf9d34b2c604b1f5058a7605bf23273ec73bc78ad (diff)
downloadgitea-c08c975d368771237d6509df915d3ec315186612.tar.gz
gitea-c08c975d368771237d6509df915d3ec315186612.zip
Fix redirection path if Slack webhook channel is invalid (#10548)
The path to the hook config is already defined by orgRepoCtx Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/webhook.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go
index 009a9e223c..8454989679 100644
--- a/routers/repo/webhook.go
+++ b/routers/repo/webhook.go
@@ -448,7 +448,7 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) {
if form.HasInvalidChannel() {
ctx.Flash.Error(ctx.Tr("repo.settings.add_webhook.invalid_channel_name"))
- ctx.Redirect(orCtx.Link + "/settings/hooks/slack/new")
+ ctx.Redirect(orCtx.Link + "/slack/new")
return
}
@@ -682,7 +682,7 @@ func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm) {
if form.HasInvalidChannel() {
ctx.Flash.Error(ctx.Tr("repo.settings.add_webhook.invalid_channel_name"))
- ctx.Redirect(fmt.Sprintf("%s/settings/hooks/%d", orCtx.Link, w.ID))
+ ctx.Redirect(fmt.Sprintf("%s/%d", orCtx.Link, w.ID))
return
}