aboutsummaryrefslogtreecommitdiff
path: root/eduserver
diff options
context:
space:
mode:
Diffstat (limited to 'eduserver')
-rw-r--r--eduserver/eduserver.go6
-rw-r--r--eduserver/input/input.go5
2 files changed, 4 insertions, 7 deletions
diff --git a/eduserver/eduserver.go b/eduserver/eduserver.go
index cba60b8e..14fbd332 100644
--- a/eduserver/eduserver.go
+++ b/eduserver/eduserver.go
@@ -13,8 +13,6 @@
package eduserver
import (
- "net/http"
-
"github.com/matrix-org/dendrite/eduserver/api"
"github.com/matrix-org/dendrite/eduserver/cache"
"github.com/matrix-org/dendrite/eduserver/input"
@@ -35,9 +33,7 @@ func SetupEDUServerComponent(
OutputTypingEventTopic: string(base.Cfg.Kafka.Topics.OutputTypingEvent),
}
- if base.EnableHTTPAPIs {
- inputAPI.SetupHTTP(http.DefaultServeMux)
- }
+ inputAPI.SetupHTTP(base.InternalAPIMux)
return inputAPI
}
diff --git a/eduserver/input/input.go b/eduserver/input/input.go
index 50837154..73777e32 100644
--- a/eduserver/input/input.go
+++ b/eduserver/input/input.go
@@ -19,6 +19,7 @@ import (
"time"
"github.com/Shopify/sarama"
+ "github.com/gorilla/mux"
"github.com/matrix-org/dendrite/eduserver/api"
"github.com/matrix-org/dendrite/eduserver/cache"
"github.com/matrix-org/dendrite/internal"
@@ -90,8 +91,8 @@ func (t *EDUServerInputAPI) sendEvent(ite *api.InputTypingEvent) error {
}
// SetupHTTP adds the EDUServerInputAPI handlers to the http.ServeMux.
-func (t *EDUServerInputAPI) SetupHTTP(servMux *http.ServeMux) {
- servMux.Handle(api.EDUServerInputTypingEventPath,
+func (t *EDUServerInputAPI) SetupHTTP(internalAPIMux *mux.Router) {
+ internalAPIMux.Handle(api.EDUServerInputTypingEventPath,
internal.MakeInternalAPI("inputTypingEvents", func(req *http.Request) util.JSONResponse {
var request api.InputTypingEventRequest
var response api.InputTypingEventResponse