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 2ff529ed99bfa33ba531d9d60fd2de95fb00b083
parent ff8eeff995d9ddd7f64cb610453f43470c3eefef
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Tue, 18 Sep 2018 14:36:31 +0200

Merge pull request #189 from mprasil/delete_fix

Add alias for DELETE call on accounts
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 @@ -238,6 +238,11 @@ fn post_email(data: JsonUpcase<ChangeEmailData>, headers: Headers, conn: DbConn) } #[post("/accounts/delete", data = "<data>")] +fn post_delete_account(data: JsonUpcase<PasswordData>, headers: Headers, conn: DbConn) -> EmptyResult { + delete_account(data, headers, conn) +} + +#[delete("/accounts", data = "<data>")] fn delete_account(data: JsonUpcase<PasswordData>, headers: Headers, conn: DbConn) -> EmptyResult { let data: PasswordData = data.into_inner().data; let user = headers.user; diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs @@ -23,6 +23,7 @@ pub fn routes() -> Vec<Route> { post_email_token, post_email, delete_account, + post_delete_account, revision_date, password_hint, prelogin,