mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Implement dummy registration and hook it up to AccountDatabase (#113)
This commit is contained in:
parent
6605333f6f
commit
0325459e7f
8 changed files with 206 additions and 9 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/storage"
|
||||
"github.com/matrix-org/dendrite/clientapi/config"
|
||||
"github.com/matrix-org/dendrite/clientapi/producers"
|
||||
"github.com/matrix-org/dendrite/clientapi/routing"
|
||||
|
@ -37,6 +38,7 @@ var (
|
|||
clientAPIOutputTopic = os.Getenv("CLIENTAPI_OUTPUT_TOPIC")
|
||||
serverName = gomatrixserverlib.ServerName(os.Getenv("SERVER_NAME"))
|
||||
serverKey = os.Getenv("SERVER_KEY")
|
||||
accountDataSource = os.Getenv("ACCOUNT_DATABASE")
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -79,7 +81,11 @@ func main() {
|
|||
}
|
||||
|
||||
queryAPI := api.NewRoomserverQueryAPIHTTP(cfg.RoomserverURL, nil)
|
||||
accountDB, err := storage.NewAccountDatabase(accountDataSource, serverName)
|
||||
if err != nil {
|
||||
log.Panicf("Failed to setup account database(%s): %s", accountDataSource, err.Error())
|
||||
}
|
||||
|
||||
routing.Setup(http.DefaultServeMux, http.DefaultClient, cfg, roomserverProducer, queryAPI)
|
||||
routing.Setup(http.DefaultServeMux, http.DefaultClient, cfg, roomserverProducer, queryAPI, accountDB)
|
||||
log.Fatal(http.ListenAndServe(bindAddr, nil))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue