mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	Fix redirection path if Slack webhook channel is invalid (#10566)
The path to the hook config is already defined by orgRepoCtx
This commit is contained in:
		@@ -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
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -642,7 +642,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
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user