mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-10 15:26:39 +00:00
Add PUT alias for profile update
This commit is contained in:
parent
3d1fc0f2e8
commit
12a2dc0901
@ -73,6 +73,11 @@ struct ProfileData {
|
||||
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>")]
|
||||
fn post_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult {
|
||||
let data: ProfileData = data.into_inner().data;
|
||||
|
@ -14,6 +14,7 @@ pub fn routes() -> Vec<Route> {
|
||||
routes![
|
||||
register,
|
||||
profile,
|
||||
put_profile,
|
||||
post_profile,
|
||||
get_public_keys,
|
||||
post_keys,
|
||||
|
Loading…
Reference in New Issue
Block a user