Skip to content

Commit

Permalink
lebab transform: default-param
Browse files Browse the repository at this point in the history
  • Loading branch information
rattrayalex-stripe committed May 4, 2019
1 parent b299fa1 commit 7eba992
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 1 addition & 3 deletions lib/resources/Files.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const multipartDataGenerator = require('../MultipartDataGenerator');
const Error = require('../Error');

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

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

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

authorizeUrl(params = {}, options = {}) {
let path = 'oauth/authorize';

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

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

function generateHeaderString(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 7eba992

Please sign in to comment.