Only send the Webhook in prod

This commit is contained in:
swagg boi 2022-07-22 00:56:57 -04:00
parent fd6616ef8b
commit 5c118d901d
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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 "$@";