Specify HTTP methods for the sync API

This commit is contained in:
Brendan Abolivier 2017-09-12 17:55:46 +01:00
parent 590c61bacd
commit bfc9997514
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -32,5 +32,5 @@ func Setup(apiMux *mux.Router, srp *sync.RequestPool, deviceDB *devices.Database
r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter() r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter()
r0mux.Handle("/sync", common.MakeAuthAPI("sync", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse { r0mux.Handle("/sync", common.MakeAuthAPI("sync", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
return srp.OnIncomingSyncRequest(req, device) return srp.OnIncomingSyncRequest(req, device)
})) })).Methods("GET")
} }