From fb6fd32bde0b2e3a9d9a4b43ea93bd3ee3ed0d0e Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Fri, 19 Apr 2024 19:00:05 +0000 Subject: [PATCH] patrons: return will only exit eval block, not the whole sub leading to double rendering --- lib/OOCEapps/Controller/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OOCEapps/Controller/Patron.pm b/lib/OOCEapps/Controller/Patron.pm index bd107ef..ed1c9a4 100644 --- a/lib/OOCEapps/Controller/Patron.pm +++ b/lib/OOCEapps/Controller/Patron.pm @@ -87,7 +87,7 @@ sub webhook { format => 'txt') } ($data->{type}, "$data->{type}.subject"); - return $c->render(json => { status => 'error' }) if !($mail && $subj); + die [ "unsupported type for webhook: '$data->{type}'" ] if !($mail && $subj); OOCEapps::Utils::sendMail( { to => $data->{data}{customer}{email}, bcc => $c->config->{emailBcc} },