Check for presence of the webhook URL dotfile
This commit is contained in:
parent
83205cdb00
commit
629b3406ac
|
@ -9,7 +9,7 @@ use List::Util qw{shuffle};
|
||||||
use Regexp::Common qw{URI};
|
use Regexp::Common qw{URI};
|
||||||
use Number::Format qw{format_number};
|
use Number::Format qw{format_number};
|
||||||
use WebService::Discord::Webhook;
|
use WebService::Discord::Webhook;
|
||||||
#use Data::Dumper; # Uncomment for debugging
|
use Data::Dumper; # Uncomment for debugging
|
||||||
|
|
||||||
# Load the model
|
# Load the model
|
||||||
use lib 'lib';
|
use lib 'lib';
|
||||||
|
@ -85,9 +85,16 @@ any [qw{GET POST}], '/sign' => sub ($c) {
|
||||||
$c->stash(status => 400)
|
$c->stash(status => 400)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$c->message->create_post($name, $message, $url, $spam);
|
my $blah =
|
||||||
|
$c->message->create_post($name, $message, $url, $spam);
|
||||||
|
say Dumper $blah;
|
||||||
|
|
||||||
$c->flash(error => 'This message was flagged as spam') if $spam;
|
if ($spam) {
|
||||||
|
$c->flash(error => 'This message was flagged as spam')
|
||||||
|
}
|
||||||
|
elsif (-s '.tom.url') {
|
||||||
|
say 'do stuff here...'
|
||||||
|
}
|
||||||
|
|
||||||
return $c->redirect_to(page => {page => 'view'});
|
return $c->redirect_to(page => {page => 'view'});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue