From ce31a223d8cd74bff5243256aec16b6e59e55a62 Mon Sep 17 00:00:00 2001 From: terrill <314156936@qq.com> Date: Fri, 27 Jul 2018 10:32:51 +0800 Subject: [PATCH] linton --- .../matrix-org/dendrite/encryptoapi/routing/routing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/encryptoapi/routing/routing.go b/src/github.com/matrix-org/dendrite/encryptoapi/routing/routing.go index 20c3b273f..4ec1b184d 100644 --- a/src/github.com/matrix-org/dendrite/encryptoapi/routing/routing.go +++ b/src/github.com/matrix-org/dendrite/encryptoapi/routing/routing.go @@ -37,13 +37,13 @@ func Setup( unstablemux := apiMux.PathPrefix(pathPrefixUnstable).Subrouter() unstablemux.Handle("/keys/upload/{deviceID}", - common.MakeAuthAPI("upload keys", nil, func(req *http.Request, device *authtypes.Device) util.JSONResponse { + common.MakeAuthAPI("upload keys", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse { return UploadPKeys(req, encryptionDB, device.UserID, device.ID) }), ).Methods(http.MethodPost, http.MethodOptions) unstablemux.Handle("/keys/upload", - common.MakeAuthAPI("upload keys", nil, func(req *http.Request, device *authtypes.Device) util.JSONResponse { + common.MakeAuthAPI("upload keys", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse { return UploadPKeys(req, encryptionDB, device.UserID, device.ID) }), ).Methods(http.MethodPost, http.MethodOptions) @@ -56,7 +56,7 @@ func Setup( ).Methods(http.MethodPost, http.MethodOptions) unstablemux.Handle("/keys/claim", - common.MakeAuthAPI("claim keys", nil, func(req *http.Request, device *authtypes.Device) util.JSONResponse { + common.MakeAuthAPI("claim keys", deviceDB, func(req *http.Request, device *authtypes.Device) util.JSONResponse { return ClaimOneTimeKeys(req, encryptionDB) }), ).Methods(http.MethodPost, http.MethodOptions)