Skip to content

Commit

Permalink
Revert "lebab transform: default-param" because it seems dangerous / …
Browse files Browse the repository at this point in the history
…backwards-incompatible.

This reverts commit 7eba992.
  • Loading branch information
rattrayalex-stripe committed May 4, 2019
1 parent db249b6 commit 2ef257a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/resources/Files.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const multipartDataGenerator = require('../MultipartDataGenerator');
const Error = require('../Error');

module.exports = StripeResource.extend({
requestDataProcessor(method, data = {}, headers, callback) {
requestDataProcessor(method, data, headers, callback) {
data = data || {};

if (method === 'POST') {
return getProcessorForSourceType(data);
} else {
Expand Down
5 changes: 4 additions & 1 deletion lib/resources/OAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const oAuthHost = 'connect.stripe.com';
module.exports = StripeResource.extend({
basePath: '/',

authorizeUrl(params = {}, options = {}) {
authorizeUrl(params, options) {
params = params || {};
options = options || {};

let path = 'oauth/authorize';

// For Express accounts, the path changes
Expand Down
4 changes: 3 additions & 1 deletion test/Webhook.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ describe('Webhooks', () => {
});
});

function generateHeaderString(opts = {}) {
function generateHeaderString(opts) {
opts = opts || {};

opts.timestamp = Math.floor(opts.timestamp) || Math.floor(Date.now() / 1000);
opts.payload = opts.payload || EVENT_PAYLOAD_STRING;
opts.secret = opts.secret || SECRET;
Expand Down

0 comments on commit 2ef257a

Please sign in to comment.