| 158 | }, err) |
| 159 | |
| 160 | function handleGetRequestParams (config) { |
| 161 | if (config && config.params) { |
| 162 | config.params.response = 'json' |
| 163 | const project = vueProps.$localStorage.get(CURRENT_PROJECT) |
| 164 | if (!config.params.projectid && !config.params.ignoreproject && project && project.id) { |
| 165 | if (config.params.command === 'listTags') { |
| 166 | config.params.projectid = '-1' |
| 167 | } else if (config.params.command !== 'assignVirtualMachine') { |
| 168 | config.params.projectid = project.id |
| 169 | } |
| 170 | } |
| 171 | if (config.params.ignoreproject !== undefined) { |
| 172 | delete config.params.ignoreproject |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | function handlePostRequestParams (config) { |
| 178 | if (config && config.data && config.data instanceof URLSearchParams) { |