summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-05-14 20:05:45 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-05-14 20:05:45 +0200
commitb85db3a10df32cb2648607c83d37160ac3ee8691 (patch)
tree3b20a35c32695270ba5bbbc0c2e1fb041184eb96 /lib/Travelynx
parent5c3a0a562a2169986f3f91034b10a5e177c7dff5 (diff)
Show web-hook test result immediately after saving it1.3.3
Closes #12
Diffstat (limited to 'lib/Travelynx')
-rw-r--r--lib/Travelynx/Controller/Account.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm
index e272eb1..e2bfd39 100644
--- a/lib/Travelynx/Controller/Account.pm
+++ b/lib/Travelynx/Controller/Account.pm
@@ -246,9 +246,18 @@ sub webhook {
token => $hook->{token},
enabled => $hook->{enabled}
);
- $self->flash( success => 'webhook' );
- $self->redirect_to('account');
- $self->run_hook( $self->current_user->{id}, 'ping' );
+ $self->run_hook(
+ $self->current_user->{id},
+ 'ping',
+ sub {
+ $self->render(
+ 'webhooks',
+ hook => $self->get_webhook,
+ new_hook => 1
+ );
+ }
+ );
+ return;
}
else {
$self->param( url => $hook->{url} );