diff options
author | Kegsay <kegan@matrix.org> | 2020-07-30 14:52:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 14:52:21 +0100 |
commit | a2174d3294841dbdf201bde76de3ffc44399fcbc (patch) | |
tree | 64f5c0d7dee038960941a937dd84631d53c1e9a9 /syncapi/routing | |
parent | 9355fb5ac8c911bdbde6dcc0f279f716d8a8f60b (diff) |
Implement /keys/changes (#1232)
* Implement /keys/changes
And refactor QueryKeyChanges to accept a `to` offset.
* Unbreak tests
* Sort keys when serialising log tokens
Diffstat (limited to 'syncapi/routing')
-rw-r--r-- | syncapi/routing/routing.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/syncapi/routing/routing.go b/syncapi/routing/routing.go index a98955c5..ed0f872e 100644 --- a/syncapi/routing/routing.go +++ b/syncapi/routing/routing.go @@ -75,4 +75,8 @@ func Setup( return GetFilter(req, device, syncDB, vars["userId"], vars["filterId"]) }), ).Methods(http.MethodGet, http.MethodOptions) + + r0mux.Handle("/keys/changes", httputil.MakeAuthAPI("keys_changes", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse { + return srp.OnIncomingKeyChangeRequest(req, device) + })).Methods(http.MethodGet, http.MethodOptions) } |