From 9a622a3f18cc0a7e286741bd076e179196904056 Mon Sep 17 00:00:00 2001 From: Ryan Seys Date: Mon, 23 Mar 2015 12:55:11 -0400 Subject: [PATCH] Use PATCH when setting BigQuery dataset metadata --- lib/bigquery/dataset.js | 2 +- test/bigquery/dataset.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bigquery/dataset.js b/lib/bigquery/dataset.js index f096e68d6eb..9eef048dbbf 100644 --- a/lib/bigquery/dataset.js +++ b/lib/bigquery/dataset.js @@ -244,7 +244,7 @@ Dataset.prototype.query = function(options, callback) { Dataset.prototype.setMetadata = function(metadata, callback) { var that = this; - this.makeReq_('PUT', '', null, metadata, function(err, resp) { + this.makeReq_('PATCH', '', null, metadata, function(err, resp) { if (err) { callback(err); return; diff --git a/test/bigquery/dataset.js b/test/bigquery/dataset.js index ad90613f3f5..eb9e434e151 100644 --- a/test/bigquery/dataset.js +++ b/test/bigquery/dataset.js @@ -345,7 +345,7 @@ describe('BigQuery/Dataset', function() { it('should send request to the api', function(done) { ds.makeReq_ = function(method, path, query, body) { - assert.equal(method, 'PUT'); + assert.equal(method, 'PATCH'); assert.equal(path, ''); assert.strictEqual(query, null); assert.deepEqual(body, METADATA);