mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix create-account
with global database settings (#2455)
* Fix create-account with global database settings * Avoid warning about open registration
This commit is contained in:
parent
3437adf597
commit
0d1505a4c1
1 changed files with 8 additions and 1 deletions
|
@ -25,6 +25,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/setup"
|
"github.com/matrix-org/dendrite/setup"
|
||||||
|
"github.com/matrix-org/dendrite/setup/base"
|
||||||
"github.com/matrix-org/dendrite/userapi/api"
|
"github.com/matrix-org/dendrite/userapi/api"
|
||||||
"github.com/matrix-org/dendrite/userapi/storage"
|
"github.com/matrix-org/dendrite/userapi/storage"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
@ -99,8 +100,14 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// avoid warning about open registration
|
||||||
|
cfg.ClientAPI.RegistrationDisabled = true
|
||||||
|
|
||||||
|
b := base.NewBaseDendrite(cfg, "")
|
||||||
|
defer b.Close() // nolint: errcheck
|
||||||
|
|
||||||
accountDB, err := storage.NewUserAPIDatabase(
|
accountDB, err := storage.NewUserAPIDatabase(
|
||||||
nil,
|
b,
|
||||||
&cfg.UserAPI.AccountDatabase,
|
&cfg.UserAPI.AccountDatabase,
|
||||||
cfg.Global.ServerName,
|
cfg.Global.ServerName,
|
||||||
cfg.UserAPI.BCryptCost,
|
cfg.UserAPI.BCryptCost,
|
||||||
|
|
Loading…
Reference in a new issue