From 87353a1cf0761e23dc6a23f744e2e4c8e15590e8 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 28 Jul 2021 13:15:54 +0100 Subject: [PATCH] Don't unmarshal request body twice --- clientapi/routing/key_crosssigning.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/clientapi/routing/key_crosssigning.go b/clientapi/routing/key_crosssigning.go index 027c5ae7..a1d99fe9 100644 --- a/clientapi/routing/key_crosssigning.go +++ b/clientapi/routing/key_crosssigning.go @@ -71,10 +71,6 @@ func UploadCrossSigningDeviceKeys( } AddCompletedSessionStage(sessionID, authtypes.LoginTypePassword) - if err := httputil.UnmarshalJSONRequest(req, &uploadReq.CrossSigningKeys); err != nil { - return *err - } - keyserverAPI.PerformUploadDeviceKeys(req.Context(), &uploadReq.PerformUploadDeviceKeysRequest, uploadRes) if err := uploadRes.Error; err != nil { switch {