mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 22:02:46 +00:00
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
This commit is contained in:
parent
d785ad82b9
commit
9834ac97db
29 changed files with 879 additions and 1013 deletions
|
@ -16,11 +16,7 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
internalHTTP "github.com/matrix-org/dendrite/internal/http"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
opentracing "github.com/opentracing/opentracing-go"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -101,19 +97,3 @@ type InputRoomEventsRequest struct {
|
|||
type InputRoomEventsResponse struct {
|
||||
EventID string `json:"event_id"`
|
||||
}
|
||||
|
||||
// RoomserverInputRoomEventsPath is the HTTP path for the InputRoomEvents API.
|
||||
const RoomserverInputRoomEventsPath = "/roomserver/inputRoomEvents"
|
||||
|
||||
// InputRoomEvents implements RoomserverInputAPI
|
||||
func (h *httpRoomserverInternalAPI) InputRoomEvents(
|
||||
ctx context.Context,
|
||||
request *InputRoomEventsRequest,
|
||||
response *InputRoomEventsResponse,
|
||||
) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "InputRoomEvents")
|
||||
defer span.Finish()
|
||||
|
||||
apiURL := h.roomserverURL + RoomserverInputRoomEventsPath
|
||||
return internalHTTP.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue