@quantcdn/quant-client 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ class HttpClient {
23
23
  do(options) {
24
24
  return __awaiter(this, void 0, void 0, function* () {
25
25
  return yield new Promise((resolve, reject) => {
26
- request(options, (error, repsonse, body) => {
26
+ request(options, (error, response, body) => {
27
27
  if (error !== null) {
28
28
  reject(error);
29
29
  }
@@ -190,12 +190,13 @@ class QuantClient {
190
190
  * The response object.
191
191
  */
192
192
  publish: (payload) => __awaiter(this, void 0, void 0, function* () {
193
- return yield this._project.patch(`publish/${payload.revision}`, {}, {
193
+ const response = yield this._project.patch(`publish/${payload.revision}`, {}, {
194
194
  'Quant-Url': payload.location
195
195
  });
196
+ return response.first();
196
197
  }),
197
198
  /**
198
- * Unpublish a revision.
199
+ * Unpublish the current published revision.
199
200
  *
200
201
  * @param payload PublishPayload
201
202
  * The payload object.
@@ -204,9 +205,10 @@ class QuantClient {
204
205
  * The response object.
205
206
  */
206
207
  unpublish: (payload) => __awaiter(this, void 0, void 0, function* () {
207
- return yield this._project.patch(`unpublish/${payload.revision}`, {}, {
208
+ const response = yield this._project.patch('unpublish', {}, {
208
209
  'Quant-Url': payload.location
209
210
  });
211
+ return response.first();
210
212
  }),
211
213
  /**
212
214
  * Redirect a URL.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantcdn/quant-client",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "Client library for API connectivity",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",