1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-16 04:12:53 +01:00

Add PUT alias for profile update

Dieser Commit ist enthalten in:
Miroslav Prasil 2018-08-15 16:10:40 +01:00
Ursprung 3d1fc0f2e8
Commit 12a2dc0901
2 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -73,6 +73,11 @@ struct ProfileData {
Name: String, Name: String,
} }
#[put("/accounts/profile", data = "<data>")]
fn put_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult {
post_profile(data, headers, conn)
}
#[post("/accounts/profile", data = "<data>")] #[post("/accounts/profile", data = "<data>")]
fn post_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult { fn post_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult {
let data: ProfileData = data.into_inner().data; let data: ProfileData = data.into_inner().data;

Datei anzeigen

@ -14,6 +14,7 @@ pub fn routes() -> Vec<Route> {
routes![ routes![
register, register,
profile, profile,
put_profile,
post_profile, post_profile,
get_public_keys, get_public_keys,
post_keys, post_keys,