mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-12-02 04:56:56 +01:00
Add alias for DELETE call on accounts
This commit is contained in:
parent
ff8eeff995
commit
f7951b44ba
2 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -23,6 +23,7 @@ pub fn routes() -> Vec<Route> {
|
|||
post_email_token,
|
||||
post_email,
|
||||
delete_account,
|
||||
post_delete_account,
|
||||
revision_date,
|
||||
password_hint,
|
||||
prelogin,
|
||||
|
|
Loading…
Reference in a new issue