yyqdbngt opened a new pull request, #3817:
URL: https://github.com/apache/rocketmq-dashboard/pull/3817

   ### Motivation
   
   The existing `settings.test.ts` covers the data-source endpoints but the 
general-settings functions — load, save and notification tests — were untested, 
including the read-only flag stripping and blank apiKey handling in 
`saveGeneralSettings`.
   
   ### Changes
   
   - `loads the general settings`: GET `/settings/general` returns the settings 
payload.
   - `strips read-only configured flags when saving general settings`: 
`*Configured` read-only markers never leave the client; the live apiKey is kept.
   - `drops a blank api key when saving general settings`: a whitespace-only 
apiKey is omitted from the save payload.
   - `tests a notification channel through the query parameter`: the channel is 
sent as a query param on `/settings/general/test-notification`.
   
   ### Verification
   
   ```
   ./node_modules/.bin/vitest run src/api/settings.test.ts   # 7 passed
   ./node_modules/.bin/tsc --noEmit                         # clean
   ./node_modules/.bin/eslint src/api/settings.test.ts       # clean
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to