aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel GarcĂ­a <[email protected]>2018-09-18 14:36:31 +0200
committerGitHub <[email protected]>2018-09-18 14:36:31 +0200
commit2ff529ed99bfa33ba531d9d60fd2de95fb00b083 (patch)
treee38de13e1ad1a3e1db0e3da43d79c2eda091a011
parentff8eeff995d9ddd7f64cb610453f43470c3eefef (diff)
parentf7951b44ba3608f2c707ed527db813a3d778fe08 (diff)
downloadvaultwarden-2ff529ed99bfa33ba531d9d60fd2de95fb00b083.tar.gz
vaultwarden-2ff529ed99bfa33ba531d9d60fd2de95fb00b083.zip
Merge pull request #189 from mprasil/delete_fix
Add alias for DELETE call on accounts
-rw-r--r--src/api/core/accounts.rs5
-rw-r--r--src/api/core/mod.rs1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs
index 78e08ba8..1c1fae23 100644
--- 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
index 31e4d601..fdff83c1 100644
--- 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,