From 7e7c3681da92a94ed1f2db57387b7b42512e8e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 4 May 2018 22:54:23 +0200 Subject: [PATCH] Implemented public key method correctly, which fixes decryption errors in collections and organizations --- src/api/core/accounts.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index 5d90ba93..7a4627f5 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -71,7 +71,11 @@ fn get_public_keys(uuid: String, headers: Headers, conn: DbConn) -> JsonResult { None => err!("User doesn't exist") }; - Ok(Json(json!(user.public_key))) + Ok(Json(json!({ + "UserId": user.uuid, + "PublicKey": user.public_key, + "Object":"userKey" + }))) } #[post("/accounts/keys", data = "")]