mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Remove unused internal APIs (#1117)
This commit is contained in:
parent
89d61c4877
commit
25cd2dd1c9
11 changed files with 3 additions and 165 deletions
|
@ -33,7 +33,6 @@ const (
|
|||
RoomserverQueryEventsByIDPath = "/roomserver/queryEventsByID"
|
||||
RoomserverQueryMembershipForUserPath = "/roomserver/queryMembershipForUser"
|
||||
RoomserverQueryMembershipsForRoomPath = "/roomserver/queryMembershipsForRoom"
|
||||
RoomserverQueryInvitesForUserPath = "/roomserver/queryInvitesForUser"
|
||||
RoomserverQueryServerAllowedToSeeEventPath = "/roomserver/queryServerAllowedToSeeEvent"
|
||||
RoomserverQueryMissingEventsPath = "/roomserver/queryMissingEvents"
|
||||
RoomserverQueryStateAndAuthChainPath = "/roomserver/queryStateAndAuthChain"
|
||||
|
@ -236,19 +235,6 @@ func (h *httpRoomserverInternalAPI) QueryMembershipsForRoom(
|
|||
return internalHTTP.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
|
||||
// QueryInvitesForUser implements RoomserverQueryAPI
|
||||
func (h *httpRoomserverInternalAPI) QueryInvitesForUser(
|
||||
ctx context.Context,
|
||||
request *api.QueryInvitesForUserRequest,
|
||||
response *api.QueryInvitesForUserResponse,
|
||||
) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "QueryInvitesForUser")
|
||||
defer span.Finish()
|
||||
|
||||
apiURL := h.roomserverURL + RoomserverQueryInvitesForUserPath
|
||||
return internalHTTP.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
|
||||
// QueryServerAllowedToSeeEvent implements RoomserverQueryAPI
|
||||
func (h *httpRoomserverInternalAPI) QueryServerAllowedToSeeEvent(
|
||||
ctx context.Context,
|
||||
|
|
|
@ -122,20 +122,6 @@ func AddRoutes(r api.RoomserverInternalAPI, internalAPIMux *mux.Router) {
|
|||
return util.JSONResponse{Code: http.StatusOK, JSON: &response}
|
||||
}),
|
||||
)
|
||||
internalAPIMux.Handle(
|
||||
RoomserverQueryInvitesForUserPath,
|
||||
internal.MakeInternalAPI("queryInvitesForUser", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryInvitesForUserRequest
|
||||
var response api.QueryInvitesForUserResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
return util.ErrorResponse(err)
|
||||
}
|
||||
if err := r.QueryInvitesForUser(req.Context(), &request, &response); err != nil {
|
||||
return util.ErrorResponse(err)
|
||||
}
|
||||
return util.JSONResponse{Code: http.StatusOK, JSON: &response}
|
||||
}),
|
||||
)
|
||||
internalAPIMux.Handle(
|
||||
RoomserverQueryServerAllowedToSeeEventPath,
|
||||
internal.MakeInternalAPI("queryServerAllowedToSeeEvent", func(req *http.Request) util.JSONResponse {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue