From f7951b44ba3608f2c707ed527db813a3d778fe08 Mon Sep 17 00:00:00 2001 From: Miroslav Prasil Date: Tue, 18 Sep 2018 11:13:45 +0100 Subject: [PATCH] Add alias for DELETE call on accounts --- src/api/core/accounts.rs | 5 +++++ src/api/core/mod.rs | 1 + 2 files changed, 6 insertions(+) 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, headers: Headers, conn: DbConn) } #[post("/accounts/delete", data = "")] +fn post_delete_account(data: JsonUpcase, headers: Headers, conn: DbConn) -> EmptyResult { + delete_account(data, headers, conn) +} + +#[delete("/accounts", data = "")] fn delete_account(data: JsonUpcase, 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 { post_email_token, post_email, delete_account, + post_delete_account, revision_date, password_hint, prelogin,