Skip to content

Commit

Permalink
Merge pull request #84 from Dwolla/DEV-926--form-urlencoded-update
Browse files Browse the repository at this point in the history
Dev 926  form urlencoded update
  • Loading branch information
tarricsookdeo authored Jun 6, 2022
2 parents 71fd0e7 + 4f2dac9 commit c18276d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/Dwolla

## License

The gem is available as open source under the terms of the [MIT License](https://github.com/Dwolla/dwolla-v2-node).
The package is available as open source under the terms of the [MIT License](https://github.com/Dwolla/dwolla-v2-node).

## Changelog

- **3.4.0** Update `form-urlencoded` version to allow `{ skipIndex: true, skipBracket: true}` options to be passed in. Thanks [@MarcMouallem](https://github.com/MarcMouallem)!
- **3.3.0** Remove lodash as a dependency and replace with `Object.assign`
- **3.2.3** Update version and changelog
- **3.2.2** Update unit test involving token. Thanks [@philting](https://github.com/philting)!
Expand Down
25 changes: 13 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dwolla-v2",
"version": "3.3.0",
"version": "3.4.0",
"description": "Dwolla V2 API client",
"main": "src/index.js",
"files": [
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"bluebird": "^3.5.1",
"form-urlencoded": "^3.0.1",
"form-urlencoded": "^4.5.1",
"invariant": "^2.2.4",
"is-stream": "^1.1.0",
"lodash.snakecase": "^4.1.1",
Expand Down
5 changes: 4 additions & 1 deletion src/dwolla/Token.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ function getUrl(token, suppliedPath, suppliedQuery) {
suppliedPath.replace(/^https?:\/\/[^\/]*\//, "")
].join("/");
}
var query = formurlencoded(rejectEmptyKeys(suppliedQuery || {}));
var query = formurlencoded(rejectEmptyKeys(suppliedQuery), {
skipIndex: true,
skipBracket: true
});
return query ? [url, query].join("?") : url;
}

Expand Down

0 comments on commit c18276d

Please sign in to comment.