Skip to content

Commit a419cc1

Browse files
Merge pull request #459 from ryanseys/patch4lyfe
Use PATCH when setting BigQuery dataset metadata
2 parents 5809f5e + 9a622a3 commit a419cc1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/bigquery/dataset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Dataset.prototype.query = function(options, callback) {
244244
Dataset.prototype.setMetadata = function(metadata, callback) {
245245
var that = this;
246246

247-
this.makeReq_('PUT', '', null, metadata, function(err, resp) {
247+
this.makeReq_('PATCH', '', null, metadata, function(err, resp) {
248248
if (err) {
249249
callback(err);
250250
return;

test/bigquery/dataset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ describe('BigQuery/Dataset', function() {
345345

346346
it('should send request to the api', function(done) {
347347
ds.makeReq_ = function(method, path, query, body) {
348-
assert.equal(method, 'PUT');
348+
assert.equal(method, 'PATCH');
349349
assert.equal(path, '');
350350
assert.strictEqual(query, null);
351351
assert.deepEqual(body, METADATA);

0 commit comments

Comments
 (0)