This pull request introduces a new API endpoint to handle bulk updates to cipher collections, along with the necessary data structure and logic to support it.
Changes:
Added a new route post_bulk_collections to the routes function in src/api/core/ciphers.rs to register the new endpoint.
Introduced the BulkCollectionsData struct to encapsulate the data required for bulk operations, including organization ID, collection IDs, cipher IDs, and a flag to indicate whether to remove collections.
Implemented the post_bulk_collections function to handle bulk updates.
Note: I am fairly new to Rust so any suggestions are appreciated.😃
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/dani-garcia/vaultwarden/pull/5838
**Author:** [@s-nix](https://github.com/s-nix)
**Created:** 5/7/2025
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `add-bulk-collection-endpoint`
---
### 📝 Commits (10+)
- [`b78835c`](https://github.com/dani-garcia/vaultwarden/commit/b78835c65f7a082d4e73b19fec2ef79dd2106e91) Add bulk_collections endpoint
- [`ebebf3b`](https://github.com/dani-garcia/vaultwarden/commit/ebebf3b8655629ed1b807530b883d353f69103d8) Resolve borrowing issues
- [`12c772b`](https://github.com/dani-garcia/vaultwarden/commit/12c772b197fc7c3a02caf8a2aecdd952a68c2dd3) Add bulk_collections endpoint
- [`bfc6410`](https://github.com/dani-garcia/vaultwarden/commit/bfc6410ccbbe2cda86ff7c081bbb8d9cc1de0cfb) Resolve borrowing issues
- [`9fe6ba9`](https://github.com/dani-garcia/vaultwarden/commit/9fe6ba9a238c8cb0b5f13161389a5a60bbbf4487) Merge branch 'add-bulk-collection-endpoint' of https://github.com/nixuno/vaultwarden into add-bulk-collection-endpoint
- [`766a58c`](https://github.com/dani-garcia/vaultwarden/commit/766a58c8ef30ec805f0916b807d2e668827b0117) cargo fmt
- [`7d11677`](https://github.com/dani-garcia/vaultwarden/commit/7d116773f9eb0faf876c21637ae45f58cd7e6064) Apply Copilot suggestions
- [`4c42a7e`](https://github.com/dani-garcia/vaultwarden/commit/4c42a7e64c1c55fc420311db0bf01187339101c4) Revert "Apply Copilot suggestions"
- [`70676a9`](https://github.com/dani-garcia/vaultwarden/commit/70676a9c236b82bcfe8ac73be5e50f741f817e40) Account for removing existing collections first
- [`d0fcc6b`](https://github.com/dani-garcia/vaultwarden/commit/d0fcc6b953744b80219d32acc3389796688018c5) Remove parenthesis
### 📊 Changes
**1 file changed** (+78 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `src/api/core/ciphers.rs` (+78 -0)
</details>
### 📄 Description
This pull request introduces a new API endpoint to handle bulk updates to cipher collections, along with the necessary data structure and logic to support it.
### Changes:
* Added a new route `post_bulk_collections` to the `routes` function in `src/api/core/ciphers.rs` to register the new endpoint.
* Introduced the `BulkCollectionsData` struct to encapsulate the data required for bulk operations, including organization ID, collection IDs, cipher IDs, and a flag to indicate whether to remove collections.
* Implemented the `post_bulk_collections` function to handle bulk updates.
Closes #5830
_Note: I am fairly new to Rust so any suggestions are appreciated._ 😃
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/5838
Author: @s-nix
Created: 5/7/2025
Status: ❌ Closed
Base:
main← Head:add-bulk-collection-endpoint📝 Commits (10+)
b78835cAdd bulk_collections endpointebebf3bResolve borrowing issues12c772bAdd bulk_collections endpointbfc6410Resolve borrowing issues9fe6ba9Merge branch 'add-bulk-collection-endpoint' of https://github.com/nixuno/vaultwarden into add-bulk-collection-endpoint766a58ccargo fmt7d11677Apply Copilot suggestions4c42a7eRevert "Apply Copilot suggestions"70676a9Account for removing existing collections firstd0fcc6bRemove parenthesis📊 Changes
1 file changed (+78 additions, -0 deletions)
View changed files
📝
src/api/core/ciphers.rs(+78 -0)📄 Description
This pull request introduces a new API endpoint to handle bulk updates to cipher collections, along with the necessary data structure and logic to support it.
Changes:
post_bulk_collectionsto theroutesfunction insrc/api/core/ciphers.rsto register the new endpoint.BulkCollectionsDatastruct to encapsulate the data required for bulk operations, including organization ID, collection IDs, cipher IDs, and a flag to indicate whether to remove collections.post_bulk_collectionsfunction to handle bulk updates.Closes #5830
Note: I am fairly new to Rust so any suggestions are appreciated. 😃
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.