0
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden synced 2024-12-14 17:43:46 +01:00

Add PUT alias for Organization updates

This commit is contained in:
Miroslav Prasil 2018-08-21 13:25:52 +01:00
parent d332e87655
commit 40d09ddd2a
2 changed files with 6 additions and 0 deletions

View file

@ -86,6 +86,7 @@ pub fn routes() -> Vec<Route> {
get_org_collections, get_org_collections,
get_org_collection_detail, get_org_collection_detail,
get_collection_users, get_collection_users,
put_organization,
post_organization, post_organization,
post_organization_collections, post_organization_collections,
delete_organization_collection_user, delete_organization_collection_user,

View file

@ -111,6 +111,11 @@ fn get_organization(org_id: String, _headers: OwnerHeaders, conn: DbConn) -> Jso
} }
} }
#[put("/organizations/<org_id>", data = "<data>")]
fn put_organization(org_id: String, headers: OwnerHeaders, data: JsonUpcase<OrganizationUpdateData>, conn: DbConn) -> JsonResult {
post_organization(org_id, headers, data, conn)
}
#[post("/organizations/<org_id>", data = "<data>")] #[post("/organizations/<org_id>", data = "<data>")]
fn post_organization(org_id: String, _headers: OwnerHeaders, data: JsonUpcase<OrganizationUpdateData>, conn: DbConn) -> JsonResult { fn post_organization(org_id: String, _headers: OwnerHeaders, data: JsonUpcase<OrganizationUpdateData>, conn: DbConn) -> JsonResult {
let data: OrganizationUpdateData = data.into_inner().data; let data: OrganizationUpdateData = data.into_inner().data;