1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-28 13:34:49 +00:00

Fix bulk collection deletion

The bulk collection delete seems to have removed the extra org_id in the
posted data. Now we only use the org_id from the path.

Fixes #4253
This commit is contained in:
BlackDex 2024-01-18 18:40:46 +01:00
commit 5d7de4dc89
No known key found for this signature in database
GPG key ID: 58C80A2AA6C765E1

View file

@ -611,7 +611,6 @@ async fn post_organization_collection_delete(
#[allow(non_snake_case)]
struct BulkCollectionIds {
Ids: Vec<String>,
OrganizationId: String,
}
#[delete("/organizations/<org_id>/collections", data = "<data>")]
@ -622,9 +621,6 @@ async fn bulk_delete_organization_collections(
mut conn: DbConn,
) -> EmptyResult {
let data: BulkCollectionIds = data.into_inner().data;
if org_id != data.OrganizationId {
err!("OrganizationId mismatch");
}
let collections = data.Ids;