Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitormattos committed Feb 14, 2021
1 parent 640d023 commit 11d887f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function register(array $file, array $users, string $name, ?string $callb
];
try {
$this->webhook->validate($data);
$return = $this->webhook->save($data);
$this->mail->notifyAllUnsigned();
} catch (\Throwable $th) {
return new JSONResponse(
[
Expand All @@ -61,8 +63,6 @@ public function register(array $file, array $users, string $name, ?string $callb
Http::STATUS_UNPROCESSABLE_ENTITY
);
}
$return = $this->webhook->save($data);
$this->mail->notifyAllUnsigned();
return new JSONResponse(
[
'message' => $this->l10n->t('Success'),
Expand Down
4 changes: 1 addition & 3 deletions lib/Service/MailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ public function notifyUnsignedUser(FileUser $data) {
try {
$this->mailer->send($message);
} catch (\Exception $e) {
$this->logger->error($e, [
'message' => 'Notify unsigned notification mail could not be sent: ' . $e->getMessage()
]);
$this->logger->error('Notify unsigned notification mail could not be sent: ' . $e->getMessage());
throw new LibresignException('Notify unsigned notification mail could not be sent', 1);
}
}
Expand Down

0 comments on commit 11d887f

Please sign in to comment.