santsys / aruba-clearpass-api

Simple library to help with using the Aruba ClearPass API.
MIT License
12 stars 0 forks source link

TypeError: this.getCertificatesAsync is not a function #4

Closed ejernkrook closed 1 year ago

ejernkrook commented 3 years ago

error when using ClearPassApi.getCertificates

TypeError: this.getCertificatesAsync is not a function
    at ClearPassApi.getCertificates (/node_modules/aruba-clearpass-api/aruba-clearpass-api.js:4767:14)
    at Object.<anonymous> (app.js:19:8)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Workaround, rename the following function line 4756, to getCertificatesAsync. It's first time I use the module, I don't know if the fix affects other functions

    getCertificates(options) {
        return this._baseGetLookupAsync(`/certificate`, options);
    }