aboutsummaryrefslogtreecommitdiff
path: root/roomserver/api/perform.go
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-06-04 15:43:07 +0100
committerGitHub <noreply@github.com>2020-06-04 15:43:07 +0100
commit9834ac97db042b0c78fbd72652aa534129ca3afe (patch)
tree4fd862ffba61e47f94b2fcc5685a0502e21b3c70 /roomserver/api/perform.go
parentd785ad82b996989381657292fbd2c28b9fbb7df6 (diff)
Convert everything but serverkeyapi to inthttp (#1096)
* Convert roomserver to new inthttp format * Convert eduserver to new inthttp format * Convert appservice to new inthttp format
Diffstat (limited to 'roomserver/api/perform.go')
-rw-r--r--roomserver/api/perform.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/roomserver/api/perform.go b/roomserver/api/perform.go
index f5afd67b..1cf54144 100644
--- a/roomserver/api/perform.go
+++ b/roomserver/api/perform.go
@@ -1,19 +1,7 @@
package api
import (
- "context"
-
- internalHTTP "github.com/matrix-org/dendrite/internal/http"
"github.com/matrix-org/gomatrixserverlib"
- "github.com/opentracing/opentracing-go"
-)
-
-const (
- // RoomserverPerformJoinPath is the HTTP path for the PerformJoin API.
- RoomserverPerformJoinPath = "/roomserver/performJoin"
-
- // RoomserverPerformLeavePath is the HTTP path for the PerformLeave API.
- RoomserverPerformLeavePath = "/roomserver/performLeave"
)
type PerformJoinRequest struct {
@@ -27,18 +15,6 @@ type PerformJoinResponse struct {
RoomID string `json:"room_id"`
}
-func (h *httpRoomserverInternalAPI) PerformJoin(
- ctx context.Context,
- request *PerformJoinRequest,
- response *PerformJoinResponse,
-) error {
- span, ctx := opentracing.StartSpanFromContext(ctx, "PerformJoin")
- defer span.Finish()
-
- apiURL := h.roomserverURL + RoomserverPerformJoinPath
- return internalHTTP.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
-}
-
type PerformLeaveRequest struct {
RoomID string `json:"room_id"`
UserID string `json:"user_id"`
@@ -46,15 +22,3 @@ type PerformLeaveRequest struct {
type PerformLeaveResponse struct {
}
-
-func (h *httpRoomserverInternalAPI) PerformLeave(
- ctx context.Context,
- request *PerformLeaveRequest,
- response *PerformLeaveResponse,
-) error {
- span, ctx := opentracing.StartSpanFromContext(ctx, "PerformLeave")
- defer span.Finish()
-
- apiURL := h.roomserverURL + RoomserverPerformLeavePath
- return internalHTTP.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
-}