diff --git a/cmd/xmtpd/main.go b/cmd/xmtpd/main.go index 69815c1b..c26364a5 100644 --- a/cmd/xmtpd/main.go +++ b/cmd/xmtpd/main.go @@ -92,8 +92,8 @@ func main() { return } - if options.CreateMlsMigration != "" && options.MlsStore.DbConnectionString != "" { - if err := server.CreateMlsMigration(options.CreateMlsMigration, options.MlsStore.DbConnectionString, options.WaitForDB, options.MlsStore.ReadTimeout, options.MlsStore.WriteTimeout, options.Store.MaxOpenConns); err != nil { + if options.CreateMlsMigration != "" && options.MLSStore.DbConnectionString != "" { + if err := server.CreateMlsMigration(options.CreateMlsMigration, options.MLSStore.DbConnectionString, options.WaitForDB, options.MLSStore.ReadTimeout, options.MLSStore.WriteTimeout, options.Store.MaxOpenConns); err != nil { log.Fatal("creating authz db migration", zap.Error(err)) } return diff --git a/pkg/server/options.go b/pkg/server/options.go index aabfffba..69096d9c 100644 --- a/pkg/server/options.go +++ b/pkg/server/options.go @@ -76,6 +76,6 @@ type Options struct { Metrics MetricsOptions `group:"Metrics Options"` Tracing TracingOptions `group:"DD APM Tracing Options"` Profiling ProfilingOptions `group:"DD APM Profiling Options" namespace:"profiling"` - MlsStore mlsstore.StoreOptions `group:"MLS Options" namespace:"mls-store"` + MLSStore mlsstore.StoreOptions `group:"MLS Options" namespace:"mls-store"` MlsValidation mlsvalidate.MlsValidationOptions `group:"MLS Validation Options" namespace:"mls-validation"` } diff --git a/pkg/server/server.go b/pkg/server/server.go index ab3c1bd1..f720e04d 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -231,8 +231,8 @@ func New(ctx context.Context, log *zap.Logger, options Options) (*Server, error) var MLSStore mlsstore.MlsStore - if options.MlsStore.DbConnectionString != "" { - mlsDb, err := createBunDB(options.MlsStore.DbConnectionString, options.WaitForDB, options.MlsStore.ReadTimeout, options.MlsStore.WriteTimeout, options.MlsStore.MaxOpenConns) + if options.MLSStore.DbConnectionString != "" { + mlsDb, err := createBunDB(options.MLSStore.DbConnectionString, options.WaitForDB, options.MLSStore.ReadTimeout, options.MLSStore.WriteTimeout, options.MLSStore.MaxOpenConns) if err != nil { return nil, errors.Wrap(err, "creating mls db") }