chore: migrate rooms.changeArchivationState to new api pattern#39808
chore: migrate rooms.changeArchivationState to new api pattern#39808Rohitgiri02 wants to merge 2 commits intoRocketChat:developfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: cb6de5e The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR migrates
rooms.changeArchivationStateto the new API route style and removes its dedicated validator definition fromrest-typings, keeping the schema local to the endpoint implementation.What changed
rooms.changeArchivationStatefrom deprecatedAPI.v1.addRoute(...)to chainedroomEndpoints.post(...).validateParamsusage withbodyschema for the migrated endpoint.200,400,401) on the migrated route.isRoomsChangeArchivationStatePropsschema/type export fromrest-typings.tracked in :- RocketChat/Rocket.Chat-Open-API#150
Why
addRouteandvalidateParamsdeprecation).rest-typings.Validation
yarn testapi -- --grep "rooms.changeArchivationState": no matching tests found (0 passing).Scope
rooms.changeArchivationState.Summary by CodeRabbit
rooms.changeArchivationStateAPI endpoint to an updated architectural pattern with improved validation and response handling.