vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit aee1ea032b424fb3b278bff2cf6136e4caf039f7
parent 484e82fb9f03edadbd7576b1e9b05edd7f24d931
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Wed, 13 May 2020 22:34:16 +0200

Merge pull request #989 from theycallmesteve/update_responses

Update responses
Diffstat:
Msrc/api/core/accounts.rs | 7++++++-
Msrc/db/models/organization.rs | 2++
2 files changed, 8 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)] diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs @@ -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