Skip to content
Snippets Groups Projects
Unverified Commit 5571a5d8 authored by theycallmesteve's avatar theycallmesteve
Browse files

Update post_keys to return a keys response model

parent 8bbbff75
No related branches found
No related tags found
No related merge requests found
...@@ -210,7 +210,12 @@ fn post_keys(data: JsonUpcase<KeysData>, headers: Headers, conn: DbConn) -> Json ...@@ -210,7 +210,12 @@ fn post_keys(data: JsonUpcase<KeysData>, headers: Headers, conn: DbConn) -> Json
user.public_key = Some(data.PublicKey); user.public_key = Some(data.PublicKey);
user.save(&conn)?; user.save(&conn)?;
Ok(Json(user.to_json(&conn)))
Ok(Json(json!({
"PrivateKey": user.private_key,
"PublicKey": user.public_key,
"Object":"keys"
})))
} }
#[derive(Deserialize)] #[derive(Deserialize)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment