geforkt von mirrored/vaultwarden
Merge pull request #189 from mprasil/delete_fix
Add alias for DELETE call on accounts
Dieser Commit ist enthalten in:
Commit
2ff529ed99
2 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
|
@ -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,
|
||||
|
|
Laden …
In neuem Issue referenzieren