Only send the Webhook in prod
This commit is contained in:
parent
fd6616ef8b
commit
5c118d901d
|
@ -54,4 +54,5 @@ Add the `-v` option for more verbose output
|
|||
|
||||
## TODOs
|
||||
|
||||
1. Have FUN
|
||||
1. Do something about the hardcoded URL in Webhook stuff
|
||||
1. Document Webhook stuff
|
||||
|
|
|
@ -92,7 +92,7 @@ any [qw{GET POST}], '/sign' => sub ($c) {
|
|||
$c->flash(error => 'This message was flagged as spam')
|
||||
}
|
||||
# Send this notification if there's a Webhook URL
|
||||
elsif (-s '.tom.url') {
|
||||
elsif (app->mode() eq 'production' && -s '.tom.url') {
|
||||
my ($url_file, $url, $webhook);
|
||||
|
||||
open($url_file, '.tom.url') || die "$@";
|
||||
|
|
Loading…
Reference in a new issue