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 12a2dc0901d9b4daeff4a6534ded1daa5edaeb87
parent 3d1fc0f2e8027f729e7581b8112f0137d5216cd8
Author: Miroslav Prasil <miroslav@prasil.info>
Date:   Wed, 15 Aug 2018 16:10:40 +0100

Add PUT alias for profile update

Diffstat:
Msrc/api/core/accounts.rs | 5+++++
Msrc/api/core/mod.rs | 1+
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs @@ -73,6 +73,11 @@ struct ProfileData { Name: String, } +#[put("/accounts/profile", data = "<data>")] +fn put_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult { + post_profile(data, headers, conn) +} + #[post("/accounts/profile", data = "<data>")] fn post_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult { let data: ProfileData = data.into_inner().data; diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs @@ -14,6 +14,7 @@ pub fn routes() -> Vec<Route> { routes![ register, profile, + put_profile, post_profile, get_public_keys, post_keys,