mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Specify HTTP method
This commit is contained in:
parent
e99ed378b6
commit
982a60a3a0
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue