mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Glue together devices and auth with the current HTTP code (#117)
- Renamed `clientapi/auth/types` to `clientapi/auth/authtypes` for the same horrible namespace clashing reasons as `storage`. - Factored out `makeAPI` to `common`. - Added in `makeAuthAPI`.
This commit is contained in:
parent
309300a744
commit
3b9222e8f7
16 changed files with 130 additions and 87 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/storage/devices"
|
||||
"github.com/matrix-org/dendrite/clientapi/config"
|
||||
"github.com/matrix-org/dendrite/clientapi/producers"
|
||||
"github.com/matrix-org/dendrite/clientapi/routing"
|
||||
|
@ -85,7 +86,11 @@ func main() {
|
|||
if err != nil {
|
||||
log.Panicf("Failed to setup account database(%s): %s", accountDataSource, err.Error())
|
||||
}
|
||||
deviceDB, err := devices.NewDatabase(accountDataSource)
|
||||
if err != nil {
|
||||
log.Panicf("Failed to setup device database(%s): %s", accountDataSource, err.Error())
|
||||
}
|
||||
|
||||
routing.Setup(http.DefaultServeMux, http.DefaultClient, cfg, roomserverProducer, queryAPI, accountDB)
|
||||
routing.Setup(http.DefaultServeMux, http.DefaultClient, cfg, roomserverProducer, queryAPI, accountDB, deviceDB)
|
||||
log.Fatal(http.ListenAndServe(bindAddr, nil))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue