fix: email template (#1830)

* fix: email template

* fix: email template
This commit is contained in:
Livio Amstutz
2021-06-08 15:12:52 +02:00
committed by GitHub
parent 81974b977d
commit 255139862d
3 changed files with 5 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@@ -142,7 +142,7 @@
<tbody>
<tr>
<td style="vertical-align:top;padding:0;">
{{if .LogoURL}}
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%"
>
@@ -174,7 +174,7 @@
</tbody>
</table>
{{end}}
</td>
</tr>
</tbody>

View File

@@ -33,7 +33,6 @@ type TemplateData struct {
PrimaryColor string
BackgroundColor string
FontColor string
IncludeLogo bool
LogoURL string
FontURL string
FontFamily string
@@ -83,10 +82,8 @@ func GetTemplateData(apiDomain, href string, text *iam_model.MailTextView, polic
if apiDomain == "" {
return templateData
}
if policy.LogoURL == "" {
templateData.IncludeLogo = false
} else {
templateData.IncludeLogo = true
templateData.LogoURL = ""
if policy.LogoURL != "" {
templateData.LogoURL = fmt.Sprintf("%s/assets/v1/%s/%s", apiDomain, policy.AggregateID, policy.LogoURL)
}
if policy.FontURL != "" {