nvazquez commented on code in PR #11354:
URL: https://github.com/apache/cloudstack/pull/11354#discussion_r2243413310


##########
ui/src/api/index.js:
##########
@@ -23,6 +23,19 @@ import {
   ACCESS_TOKEN
 } from '@/store/mutation-types'
 
+const getAPICommandsRegex = /^(get|list|query|find)\w+$/i
+const addlGetAPICommandsList = [

Review Comment:
   ```suggestion
   const addGetAPICommandsList = [
   ```



##########
ui/src/api/index.js:
##########
@@ -64,6 +77,12 @@ export function postAPI (command, data = {}) {
   })
 }
 
+export function callAPI (command, args = {}) {
+  const isGetAPICommand = getAPICommandsRegex.test(command) || 
addlGetAPICommandsList.includes(command.toLowerCase())

Review Comment:
   ```suggestion
     const isGetAPICommand = getAPICommandsRegex.test(command) || 
addGetAPICommandsList.includes(command.toLowerCase())
   ```



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to