From 982a60a3a03131c865c24a4f17ebee5411d28b78 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 21 Sep 2017 19:31:31 +0200 Subject: [PATCH] Specify HTTP method --- src/github.com/matrix-org/dendrite/syncapi/routing/routing.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/syncapi/routing/routing.go b/src/github.com/matrix-org/dendrite/syncapi/routing/routing.go index e90b18909..5bad22b53 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/routing/routing.go +++ b/src/github.com/matrix-org/dendrite/syncapi/routing/routing.go @@ -30,6 +30,7 @@ const pathPrefixR0 = "/_matrix/client/r0" // Setup configures the given mux with sync-server listeners func Setup(apiMux *mux.Router, srp *sync.RequestPool, deviceDB *devices.Database) { r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter() + r0mux.Handle("/sync", common.MakeAuthAPI("sync", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse { return srp.OnIncomingSyncRequest(req, device) })).Methods("GET") @@ -37,5 +38,5 @@ func Setup(apiMux *mux.Router, srp *sync.RequestPool, deviceDB *devices.Database r0mux.Handle("/rooms/{roomID}/state", common.MakeAuthAPI("room_state", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse { vars := mux.Vars(req) return srp.OnIncomingStateRequest(req, vars["roomID"]) - })) + })).Methods("GET") }