Copilot commented on code in PR #12558:
URL: https://github.com/apache/cloudstack/pull/12558#discussion_r2745836536
##########
ui/src/components/view/SearchFilter.vue:
##########
@@ -316,7 +316,7 @@ export default {
if (!this.$isValidUuid(id)) {
return resolve('')
}
- api(apiName, { listAll: true, id: id }).then(json => {
+ getAPI(apiName, { listAll: true, id: id }).then(json => {
Review Comment:
This should use `getAPI` instead of `postAPI`. The `getResourceNameById`
function is called with API names from the `apiMap` object (lines 92-169), all
of which are `list*` commands (e.g., `listZones`, `listDomains`,
`listAccounts`, etc.). According to the pattern defined in
`ui/src/api/index.js` (line 26), commands starting with `list` should use GET
requests via `getAPI`, not POST requests via `postAPI`.
```suggestion
getAPI(apiName, { listAll: true, id: id }).then(json => {
```
--
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]