fix mongodb root password sync (#12547)

#### What this PR does / why we need it?

#### Summary of your change

#### Please indicate you've done the following:

- [ ] Made sure tests are passing and test coverage is added if needed.
- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
This commit is contained in:
王贺
2026-04-21 04:00:57 +00:00
committed by GitHub
parent 9f5a1d842a
commit cc0ac8cc43
7 changed files with 175 additions and 14 deletions
+5
View File
@@ -112,6 +112,11 @@ export const updateMongodbPassword = (params: Database.MongodbPassword) => {
encodeBase64Fields(request, ['password']);
return http.post(`/databases/mongodb/password`, request, TimeoutEnum.T_40S);
};
export const updateMongodbRootPassword = (params: Database.ChangeInfo) => {
let request = deepCopy(params) as Database.ChangeInfo;
encodeBase64Fields(request, ['value']);
return http.post(`/databases/mongodb/root/password`, request, TimeoutEnum.T_40S);
};
export const updateMongodbDescription = (params: DescriptionUpdate) => {
return http.post(`/databases/mongodb/description`, params, TimeoutEnum.T_40S);
};