aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Prasil <[email protected]>2018-08-21 13:25:52 +0100
committerMiroslav Prasil <[email protected]>2018-08-21 13:25:52 +0100
commit40d09ddd2a7cdf5db79646121fe7ffb1f8d2b236 (patch)
treefd3247cae1c06e6a718d9c8aeb2200192106668d
parentd332e87655a4e785ed0aba4ce12daec7f9dfdc61 (diff)
downloadvaultwarden-40d09ddd2a7cdf5db79646121fe7ffb1f8d2b236.tar.gz
vaultwarden-40d09ddd2a7cdf5db79646121fe7ffb1f8d2b236.zip
Add PUT alias for Organization updates
-rw-r--r--src/api/core/mod.rs1
-rw-r--r--src/api/core/organizations.rs5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs
index 4206aca2..907b053b 100644
--- a/src/api/core/mod.rs
+++ b/src/api/core/mod.rs
@@ -86,6 +86,7 @@ pub fn routes() -> Vec<Route> {
get_org_collections,
get_org_collection_detail,
get_collection_users,
+ put_organization,
post_organization,
post_organization_collections,
delete_organization_collection_user,
diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs
index a4568562..c2ecde26 100644
--- a/src/api/core/organizations.rs
+++ b/src/api/core/organizations.rs
@@ -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>")]
fn post_organization(org_id: String, _headers: OwnerHeaders, data: JsonUpcase<OrganizationUpdateData>, conn: DbConn) -> JsonResult {
let data: OrganizationUpdateData = data.into_inner().data;