Browse Source
Update post_keys to return a keys response model
pull/989/head
theycallmesteve
5 years ago
No known key found for this signature in database
GPG Key ID: 6240923F65CC698D
1 changed files with
6 additions and
1 deletions
-
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)] |
|
|
|