Convert everything but serverkeyapi to inthttp (#1096)

* Convert roomserver to new inthttp format

* Convert eduserver to new inthttp format

* Convert appservice to new inthttp format
This commit is contained in:
Kegsay 2020-06-04 15:43:07 +01:00 committed by GitHub
parent d785ad82b9
commit 9834ac97db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 879 additions and 1013 deletions

View file

@ -16,6 +16,7 @@ package roomserver
import (
"github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/dendrite/roomserver/inthttp"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/dendrite/internal/basecomponent"
@ -38,7 +39,7 @@ func SetupRoomServerComponent(
logrus.WithError(err).Panicf("failed to connect to room server db")
}
internalAPI := internal.RoomserverInternalAPI{
internalAPI := &internal.RoomserverInternalAPI{
DB: roomserverDB,
Cfg: base.Cfg,
Producer: base.KafkaProducer,
@ -49,7 +50,7 @@ func SetupRoomServerComponent(
KeyRing: keyRing,
}
internalAPI.SetupHTTP(base.InternalAPIMux)
inthttp.AddRoutes(internalAPI, base.InternalAPIMux)
return &internalAPI
return internalAPI
}