fix email template

- fix verification types
- add design to cassandra db provider for email_template
- fix default email verification types to include update_email
This commit is contained in:
Lakhan Samani
2022-08-13 11:34:24 +05:30
parent ad3e615ac7
commit 4f81d1969e
12 changed files with 100 additions and 71 deletions

View File

@@ -224,10 +224,11 @@ func NewProvider() (*provider, error) {
return nil, err
}
// add subject on email_templates table
emailTemplateAlterQuery := fmt.Sprintf(`ALTER TABLE %s.%s ADD subject text;`, KeySpace, models.Collections.EmailTemplate)
emailTemplateAlterQuery := fmt.Sprintf(`ALTER TABLE %s.%s ADD (subject text, design text);`, KeySpace, models.Collections.EmailTemplate)
err = session.Query(emailTemplateAlterQuery).Exec()
if err != nil {
return nil, err
log.Debug("Failed to alter table as column exists: ", err)
// continue
}
otpCollection := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s.%s (id text, email text, otp text, expires_at bigint, updated_at bigint, created_at bigint, PRIMARY KEY (id))", KeySpace, models.Collections.OTP)