Browse Source
Merge pull request #989 from theycallmesteve/update_responses
Update responses
pull/998/head
Daniel García
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
1 deletions
-
src/api/core/accounts.rs
-
src/db/models/organization.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)] |
|
|
|
|
|
@ -274,6 +274,8 @@ impl UserOrganization { |
|
|
|
"UseGroups": false, |
|
|
|
"UseTotp": true, |
|
|
|
"UsePolicies": true, |
|
|
|
"UseApi": false, |
|
|
|
"SelfHost": true, |
|
|
|
|
|
|
|
"MaxStorageGb": 10, // The value doesn't matter, we don't check server-side
|
|
|
|
|
|
|
|