mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Roomserver API changes (#1118)
* s/QueryBackfill/PerformBackfill/g * OutputEvent now includes AddStateEvents which contain the full event of extra state events * Only include adds not the current event * Get adding state right
This commit is contained in:
parent
25cd2dd1c9
commit
ec7718e7f8
17 changed files with 152 additions and 287 deletions
|
@ -165,14 +165,14 @@ func AddRoutes(r api.RoomserverInternalAPI, internalAPIMux *mux.Router) {
|
|||
}),
|
||||
)
|
||||
internalAPIMux.Handle(
|
||||
RoomserverQueryBackfillPath,
|
||||
internal.MakeInternalAPI("QueryBackfill", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryBackfillRequest
|
||||
var response api.QueryBackfillResponse
|
||||
RoomserverPerformBackfillPath,
|
||||
internal.MakeInternalAPI("PerformBackfill", func(req *http.Request) util.JSONResponse {
|
||||
var request api.PerformBackfillRequest
|
||||
var response api.PerformBackfillResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
return util.ErrorResponse(err)
|
||||
}
|
||||
if err := r.QueryBackfill(req.Context(), &request, &response); err != nil {
|
||||
if err := r.PerformBackfill(req.Context(), &request, &response); err != nil {
|
||||
return util.ErrorResponse(err)
|
||||
}
|
||||
return util.JSONResponse{Code: http.StatusOK, JSON: &response}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue