Skip to content
Browse files

make options arg to listDistributions and listInvalidations optional

  • Loading branch information...
1 parent 644df99 commit 34f35a7877fdb35ae0c4951541745186ef16147b @tellnes committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/index.js
View
10 lib/index.js
@@ -237,6 +237,11 @@ CloudFront.prototype.deleteDistribution = function(distribution, etag, opts, cb)
};
CloudFront.prototype.listDistributions = function(opts, cb) {
+ if (arguments.length === 1) {
+ cb = opts;
+ opts = {};
+ }
+
var self = this;
this.request('GET', listOptsToPath('distribution', opts), function(err, body) {
if (err) return cb(err);
@@ -273,6 +278,11 @@ CloudFront.prototype.getInvalidation = function(distribution, id, cb) {
};
CloudFront.prototype.listInvalidations = function(distribution, opts, cb) {
+ if (arguments.length === 2) {
+ cb = opts;
+ opts = {};
+ }
+
var self = this;
this.request('GET', listOptsToPath('distribution/' + distribution + '/invalidation', opts), function(err, body) {
if (err) return cb(err);

0 comments on commit 34f35a7

Please sign in to comment.
Something went wrong with that request. Please try again.