The endpoint at WATCHLISTS_ADD_PATH is expecting a PUT or DELETE request.
However the current addToWatchlist() function is sending a GET request.
This PR fixes addToWatchlist() and adds removeFromWatchlist().
The WATCHLISTS_ADD_PATH is renamed WATCHLISTS_ADD_DELETE_PATH.
In order to run the tests on windows I had to add cross-env to devDependency to set NODE_ENV correctly. The USERNAME environment variable is already set on windows which dotenv doesn't override. This forced me to prefix all variables in .env.example with AVANZA_.
The endpoint at
WATCHLISTS_ADD_PATH
is expecting aPUT
orDELETE
request. However the currentaddToWatchlist()
function is sending aGET
request.This PR fixes addToWatchlist() and adds removeFromWatchlist(). The
WATCHLISTS_ADD_PATH
is renamedWATCHLISTS_ADD_DELETE_PATH
.In order to run the tests on windows I had to add
cross-env
to devDependency to setNODE_ENV
correctly. TheUSERNAME
environment variable is already set on windows whichdotenv
doesn't override. This forced me to prefix all variables in.env.example
withAVANZA_
.All tests passed and docs updated.
Thank you for making this module!