Skip to content

Commit

Permalink
fix getSubscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Feb 19, 2015
1 parent 607638c commit 0105339
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/pubsub/topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ Topic.prototype.delete = function(callback) {
* }, function(err, subscriptions, nextQuery) {});
*/
Topic.prototype.getSubscriptions = function(query, callback) {
if (util.is(query, 'function')) {
callback = query;
query = {};
}

query.query = 'pubsub.googleapis.com/topic in (' + this.name + ')';

this.pubsub.getSubscriptions(query, callback);
};

Expand Down

0 comments on commit 0105339

Please sign in to comment.