Skip to content

Commit

Permalink
Merge branch 'main' into f/strip_vochain_data
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed Oct 16, 2024
2 parents 0aca91a + 2828a7b commit adc63d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (ms *MongoStorage) createIndexes() error {
// create an index for the 'phone' field on users
userPhoneIndex := mongo.IndexModel{
Keys: bson.D{{Key: "phone", Value: 1}}, // 1 for ascending order
Options: options.Index().SetUnique(true),
Options: options.Index().SetSparse(true),
}
if _, err := ms.users.Indexes().CreateOne(ctx, userPhoneIndex); err != nil {
return fmt.Errorf("failed to create index on phone for users: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion notifications/smtp/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (se *SMTPEmail) New(rawConfig any) error {
// set configuration in struct
se.config = config
// init SMTP auth
if se.config.SMTPUsername == "" || se.config.SMTPPassword == "" {
if se.config.SMTPUsername != "" && se.config.SMTPPassword != "" {
se.auth = smtp.PlainAuth("", se.config.SMTPUsername, se.config.SMTPPassword, se.config.SMTPServer)
}
return nil
Expand Down

0 comments on commit adc63d5

Please sign in to comment.