Loading request...
为legacy users REST API endpoints添加显式的schema验证,以避免运行时回归。
## Description The legacy `users` REST API endpoints currently lack explicit schema validation. Inputs are weakly typed or imperatively checked inside the handlers, which can lead to runtime regressions. The following endpoints need to be formally typed and migrated using `ajv` via `@rocket.chat/rest-typings`: - `users.getAvatar` - `users.deleteOwnAccount` - `users.resetAvatar` - `users.forgotPassword` ## Proposed Solution 1. Add TypeBox/Ajv JSON schemas to `packages/rest-typings`. 2. Export the typing boundaries. 3. Attach the `validateParams` option onto the `API.v1.addRoute` config block for these endpoints.