mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-20 14:36:09 +08:00
feat(notify): mandatory update of VERIFY and USER_LOGIN_EXCEPTION templates
This commit is contained in:
@@ -146,8 +146,9 @@ func (tm *STemplateManager) GetCompanyInfo(ctx context.Context) (SCompanyInfo, e
|
||||
}
|
||||
|
||||
var (
|
||||
ForceInitType = []string{
|
||||
api.EMAIL,
|
||||
forceInitTopic = []string{
|
||||
"VERIFY",
|
||||
"USER_LOGIN_EXCEPTION",
|
||||
}
|
||||
notifyclientI18nTable = i18n.Table{}
|
||||
defaultLang = api.TEMPLATE_LANG_CN
|
||||
@@ -187,7 +188,7 @@ func (tm *STemplateManager) InitializeData() error {
|
||||
for _, template := range templates {
|
||||
q := tm.Query().Equals("contact_type", template.ContactType).Equals("topic", template.Topic).Equals("template_type", template.TemplateType).Equals("lang", template.Lang)
|
||||
count, _ := q.CountWithError()
|
||||
if count > 0 && !utils.IsInStringArray(template.ContactType, ForceInitType) {
|
||||
if count > 0 && !utils.IsInStringArray(template.Topic, forceInitTopic) {
|
||||
continue
|
||||
}
|
||||
if count == 0 {
|
||||
|
||||
Reference in New Issue
Block a user