Closed kwaa closed 2 months ago
The changes involve a significant shift in how account-related data is processed within the API. The CreateRemoveAccount
structure has been renamed and its handling updated to utilize query parameters instead of JSON payloads for account creation and removal requests. This adjustment is reflected across multiple files, including route handlers and documentation, indicating a unified approach to parameter handling. The modifications enhance clarity in the codebase and streamline the interaction with the API.
Files | Change Summary |
---|---|
crates/api_admin/src/entities/create_remove_account.rs |
Renamed CreateRemoveAccount to CreateRemoveAccountQuery , updated derive attributes from ToSchema to IntoParams . |
crates/api_admin/src/entities/mod.rs |
Updated public export from CreateRemoveAccount to CreateRemoveAccountQuery , keeping CreateRemoveAccountResult unchanged. |
crates/api_admin/src/routes/create_account.rs |
Changed function parameter from Json<CreateRemoveAccount> to Query<CreateRemoveAccountQuery> . |
crates/api_admin/src/routes/mod.rs |
Removed CreateRemoveAccount from OpenAPI schema components. |
crates/api_admin/src/routes/remove_account.rs |
Changed function parameter from Json<CreateRemoveAccount> to Query<CreateRemoveAccountQuery> . |
docs/src/admins/create-account.md |
Updated example command to use query parameters instead of JSON payload for API account creation. |
sequenceDiagram
participant Client
participant API
participant Database
Client->>API: POST /create-account?name=example.com&token=abc123
API->>Database: Create account with name example.com
Database-->>API: Account created
API-->>Client: 201 Created
sequenceDiagram
participant Client
participant API
participant Database
Client->>API: POST /remove-account?name=example.com&token=abc123
API->>Database: Remove account with name example.com
Database-->>API: Account removed
API-->>Client: 200 OK
🐇 In fields of code where bunnies play,
New paths emerge, bright as day.
With queries clear and names so bright,
We hop along, all feels just right!
A leap for change, a joyful cheer,
For every byte, we hold so dear! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation