aboutsummaryrefslogtreecommitdiff
path: root/appservice/inthttp/server.go
blob: 01d9f989592d13b2444a3d8c746e9b0a4c92d1e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package inthttp

import (
	"github.com/gorilla/mux"
	"github.com/matrix-org/dendrite/appservice/api"
	"github.com/matrix-org/dendrite/internal/httputil"
)

// AddRoutes adds the AppServiceQueryAPI handlers to the http.ServeMux.
func AddRoutes(a api.AppServiceInternalAPI, internalAPIMux *mux.Router) {
	internalAPIMux.Handle(
		AppServiceRoomAliasExistsPath,
		httputil.MakeInternalRPCAPI("AppserviceRoomAliasExists", a.RoomAliasExists),
	)

	internalAPIMux.Handle(
		AppServiceUserIDExistsPath,
		httputil.MakeInternalRPCAPI("AppserviceUserIDExists", a.UserIDExists),
	)
}