Skip to content

Commit e40e71d

Browse files
committed
Fixed GET request containing body for read requests
fixes #394 - GET requests shouldn't contain a body and some load balancers (apparently GCP) will terminate the request because it is malformed - also fixes linting issue with double quotes
1 parent 1c3cac1 commit e40e71d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/admin-api/lib/admin-api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ module.exports = function GhostAdminAPI(options) {
226226

227227
queryParams = Object.assign({}, queryParams, data);
228228

229-
return makeResourceRequest(resourceType, queryParams, {}, 'GET', urlParams);
229+
return makeResourceRequest(resourceType, queryParams, '', 'GET', urlParams);
230230
}
231231

232232
let resourceAPI = {};
@@ -381,7 +381,7 @@ module.exports = function GhostAdminAPI(options) {
381381
});
382382
}
383383

384-
function makeResourceRequest(resourceType, queryParams = {}, body = "", method = 'GET', urlParams = {}) {
384+
function makeResourceRequest(resourceType, queryParams = {}, body = '', method = 'GET', urlParams = {}) {
385385
return makeApiRequest({
386386
endpoint: endpointFor(resourceType, urlParams),
387387
method,

0 commit comments

Comments
 (0)