vultr/vultr-node

[BUG] - instances.updateInstance() does not work correctly

gabos31 opened this issue · 2 comments

Describe the bug

  1. Error in the code
    (newObj, key) => Object.assign(newObj, { [key]: parameters[key] }),

    should be: (newObj, key) => Object.assign(newObj, { [key]: userParameters[key] }),
  2. Parameters that are passed empty (''), for example, the security group from which you want to exclude the instance, are not included in the request body. This is due to a parameter validation error.
    For example, this can be avoided by adding an additional condition to
    } else if (userParameter) {

    should be: } else if (userParameter || userParameter === '') {

@gabos31 Thanks for reporting the issues! Feel free to submit PRs to fix them if you want.

@ddymko I created a PR, but there are some problems with checks. #452