Skip to content

Commit

Permalink
fix(server): disable compat when account db is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Sep 4, 2023
1 parent 1405dd6 commit ba45558
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/internal/app/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ func initReposAndGateways(ctx context.Context, conf *config.Config, debug bool)

// repos
accountDatabase := conf.DB_Account
accountRepoCompat := false
if accountDatabase == "" {
accountDatabase = databaseName
accountRepoCompat = true
}

txAvailable := mongox.IsTransactionAvailable(conf.DB)

accountRepos, err := accountmongo.New(ctx, client, databaseName, txAvailable, true)
accountRepos, err := accountmongo.New(ctx, client, databaseName, txAvailable, accountRepoCompat)
if err != nil {
log.Fatalf("Failed to init mongo: %+v\n", err)
}
Expand Down

0 comments on commit ba45558

Please sign in to comment.