(ctx context.Context, registerUrl string)
| 166 | } |
| 167 | |
| 168 | func (es *EmailService) RegisterTemplate(ctx context.Context, registerUrl string) (title, body string, err error) { |
| 169 | siteInfo, err := es.siteInfoService.GetSiteGeneral(ctx) |
| 170 | if err != nil { |
| 171 | return |
| 172 | } |
| 173 | templateData := &schema.RegisterTemplateData{ |
| 174 | SiteName: siteInfo.Name, |
| 175 | RegisterUrl: registerUrl, |
| 176 | } |
| 177 | |
| 178 | lang := handler.GetLangByCtx(ctx) |
| 179 | title = translator.TrWithData(lang, constant.EmailTplKeyRegisterTitle, templateData) |
| 180 | body = translator.TrWithData(lang, constant.EmailTplKeyRegisterBody, templateData) |
| 181 | return title, body, nil |
| 182 | } |
| 183 | |
| 184 | func (es *EmailService) PassResetTemplate(ctx context.Context, passResetUrl string) (title, body string, err error) { |
| 185 | siteInfo, err := es.siteInfoService.GetSiteGeneral(ctx) |
no test coverage detected