mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-23 04:01:38 +00:00
c45d0936b5
* Generic-based internal HTTP API (tested out on a few endpoints in the federation API) * Add `PerformInvite` * More tweaks * Fix metric name * Fix LookupStateIDs * Lots of changes to clients * Some serverside stuff * Some error handling * Use paths as metric names * Revert "Use paths as metric names" This reverts commit a9323a6a343f5ce6461a2e5bd570fe06465f1b15. * Namespace metric names * Remove duplicate entry * Remove another duplicate entry * Tweak error handling * Some more tweaks * Update error behaviour * Some more error tweaking * Fix API path for `PerformDeleteKeys` * Fix another path * Tweak federation client proxying * Fix another path * Don't return typed nils * Some more tweaks, not that it makes any difference * Tweak federation client proxying * Maybe fix the key backup test
21 lines
574 B
Go
21 lines
574 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),
|
|
)
|
|
}
|