1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Run Linter

This commit is contained in:
Bradley Schofield 2023-08-28 06:53:26 +01:00
parent 11dca76a70
commit 88d48715c5
3 changed files with 3 additions and 3 deletions

View file

@ -1734,7 +1734,7 @@ App::patch('/v1/projects/:projectId/templates/email/:type/:locale')
} }
$smtpEnabled = $project->getAttribute('smtp', [])['enabled'] ?? false; $smtpEnabled = $project->getAttribute('smtp', [])['enabled'] ?? false;
if(!$smtpEnabled) { if (!$smtpEnabled) {
throw new Exception(Exception::PROJECT_SMTP_CONFIG_NOT_FOUND); throw new Exception(Exception::PROJECT_SMTP_CONFIG_NOT_FOUND);
} }

View file

@ -553,7 +553,7 @@ App::post('/v1/teams/:teamId/memberships')
$body = Template::fromString($customTemplate['message'] ?? ''); $body = Template::fromString($customTemplate['message'] ?? '');
$subject = $customTemplate['subject'] ?? $subject; $subject = $customTemplate['subject'] ?? $subject;
$from = $customTemplate['senderName'] ?? $from; $from = $customTemplate['senderName'] ?? $from;
$smtp = $project->getAttribute('smtp', []); $smtp = $project->getAttribute('smtp', []);
$mails $mails
->setSmtpHost($smtp['host'] ?? '') ->setSmtpHost($smtp['host'] ?? '')

View file

@ -43,7 +43,7 @@ class MailsV1 extends Worker
$body = Template::fromFile(__DIR__ . '/../config/locale/templates/email-base.tpl'); $body = Template::fromFile(__DIR__ . '/../config/locale/templates/email-base.tpl');
foreach ($variables as $key => $value) { foreach ($variables as $key => $value) {
$body->setParam('{{'.$key.'}}', $value); $body->setParam('{{' . $key . '}}', $value);
} }
$body = $body->render(); $body = $body->render();