From 42f264119f59b4c6982a97eb97791f245b1db6b1 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Fri, 22 Sep 2017 17:28:29 +0100 Subject: [PATCH] Stub APIs for sytest (#261) --- .../dendrite/clientapi/routing/routing.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go b/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go index e4b7eb80..31b939b8 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go @@ -345,4 +345,23 @@ func Setup( return util.JSONResponse{Code: 200, JSON: struct{}{}} }), ).Methods("PUT", "OPTIONS") + + // Stub implementations for sytest + r0mux.Handle("/events", + common.MakeAPI("events", func(req *http.Request) util.JSONResponse { + return util.JSONResponse{Code: 200, JSON: map[string]interface{}{ + "chunk": []interface{}{}, + "start": "", + "end": "", + }} + }), + ).Methods("GET") + + r0mux.Handle("/initialSync", + common.MakeAPI("initial_sync", func(req *http.Request) util.JSONResponse { + return util.JSONResponse{Code: 200, JSON: map[string]interface{}{ + "end": "", + }} + }), + ).Methods("GET") }