mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-25 13:11:37 +00:00
b367cfeddf
Implements the following endpoints ``` GET /_matrix/client/v3/thirdparty/protocols GET /_matrix/client/v3/thirdparty/protocols/{protocol} GET /_matrix/client/v3/thirdparty/location GET /_matrix/client/v3/thirdparty/location/{protocol} GET /_matrix/client/v3/thirdparty/user GET /_matrix/client/v3/thirdparty/user/{protocol} ```
37 lines
926 B
Go
37 lines
926 B
Go
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),
|
|
)
|
|
|
|
internalAPIMux.Handle(
|
|
AppServiceProtocolsPath,
|
|
httputil.MakeInternalRPCAPI("AppserviceProtocols", a.Protocols),
|
|
)
|
|
|
|
internalAPIMux.Handle(
|
|
AppServiceLocationsPath,
|
|
httputil.MakeInternalRPCAPI("AppserviceLocations", a.Locations),
|
|
)
|
|
|
|
internalAPIMux.Handle(
|
|
AppServiceUserPath,
|
|
httputil.MakeInternalRPCAPI("AppserviceUser", a.User),
|
|
)
|
|
}
|