diff options
Diffstat (limited to 'clientapi/routing/routing.go')
-rw-r--r-- | clientapi/routing/routing.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index f764bd4d..965a46d2 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -695,4 +695,17 @@ func Setup( return GetCapabilities(req, rsAPI) }), ).Methods(http.MethodGet) + + r0mux.Handle("/keys/query", + httputil.MakeAuthAPI("queryKeys", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse { + return QueryKeys(req) + }), + ).Methods(http.MethodPost, http.MethodOptions) + + // Supplying a device ID is deprecated. + r0mux.Handle("/keys/upload/{deviceID}", + httputil.MakeAuthAPI("keys_upload", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse { + return UploadKeys(req) + }), + ).Methods(http.MethodPost, http.MethodOptions) } |