commit 5571a5d8ed54c546e86b5d24108351c640c5b86c parent 8bbbff7567e611e1366e981de988f5249c6a8a0d Author: theycallmesteve <59837464+theycallmesteve@users.noreply.github.com> Date: Fri, 8 May 2020 13:38:49 -0400 Update post_keys to return a keys response model Diffstat:
M | src/api/core/accounts.rs | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs @@ -210,7 +210,12 @@ fn post_keys(data: JsonUpcase<KeysData>, headers: Headers, conn: DbConn) -> Json user.public_key = Some(data.PublicKey); user.save(&conn)?; - Ok(Json(user.to_json(&conn))) + + Ok(Json(json!({ + "PrivateKey": user.private_key, + "PublicKey": user.public_key, + "Object":"keys" + }))) } #[derive(Deserialize)]