Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/pubsub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var util = require('../common/util.js');
* @const {string} Base URL for Pub/Sub API.
* @private
*/
var PUBSUB_BASE_URL = 'https://pubsub.googleapis.com/v1beta2/';
var PUBSUB_BASE_URL = 'https://pubsub.googleapis.com/v1/';

/**
* @const {array} Required scopes for Pub/Sub API.
Expand Down
4 changes: 2 additions & 2 deletions lib/pubsub/subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ Subscription.prototype.pull = function(options, callback) {
* interrupted.
*
* @param {object} options - The configuration object.
* @param {number} options.ackId - The ack id to change.
* @param {number|number[]} options.ackIds - The ack id(s) to change.
* @param {number} options.seconds - Number of seconds after call is made to
* set the deadline of the ack.
* @param {Function=} callback - The callback function.
Expand All @@ -401,7 +401,7 @@ Subscription.prototype.pull = function(options, callback) {
*/
Subscription.prototype.setAckDeadline = function(options, callback) {
var body = {
ackId: options.ackId,
ackIds: util.arrayize(options.ackIds),

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

ackDeadlineSeconds: options.seconds
};

Expand Down
2 changes: 1 addition & 1 deletion system-test/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ describe('pubsub', function() {
assert.ifError(err);

var options = {
ackId: msgs[0].ackId,
ackIds: [msgs[0].ackId],
seconds: 10
};
subscription.setAckDeadline(options, done);
Expand Down
4 changes: 2 additions & 2 deletions test/pubsub/subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ describe('Subscription', function() {
assert.equal(method, 'POST');
assert.equal(path, this.name + ':modifyAckDeadline');
assert.equal(qs, null);
assert.deepEqual(body, { ackId: 123, ackDeadlineSeconds: 10 });
assert.deepEqual(body, { ackIds: [123], ackDeadlineSeconds: 10 });
done();
};
subscription.setAckDeadline({ ackId: 123, seconds: 10 }, done);
subscription.setAckDeadline({ ackIds: [123], seconds: 10 }, done);
});

it('should execute the callback', function(done) {
Expand Down