From d34617281965b08a61edd1d3326b7b0c0614a778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Mon, 29 Mar 2021 11:19:42 +0200 Subject: [PATCH] Merge pull request #3776 from overleaf/ho-post-clsi-cookie convert _populateServerIdViaRequest to a post request GitOrigin-RevId: cbbf926708804527ba3717a66e9f0192ecf70fbd --- services/web/app/src/Features/Compile/ClsiCookieManager.js | 2 +- services/web/test/unit/src/Compile/ClsiCookieManagerTests.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/src/Features/Compile/ClsiCookieManager.js b/services/web/app/src/Features/Compile/ClsiCookieManager.js index 67fbe5845a..13ac423fe6 100644 --- a/services/web/app/src/Features/Compile/ClsiCookieManager.js +++ b/services/web/app/src/Features/Compile/ClsiCookieManager.js @@ -58,7 +58,7 @@ module.exports = function(backendGroup) { callback = function(err, serverId) {} } const url = `${Settings.apis.clsi.url}/project/${project_id}/status` - return request.get(url, (err, res, body) => { + return request.post(url, (err, res, body) => { if (err != null) { OError.tag(err, 'error getting initial server id for project', { project_id diff --git a/services/web/test/unit/src/Compile/ClsiCookieManagerTests.js b/services/web/test/unit/src/Compile/ClsiCookieManagerTests.js index 732d73ebbd..d4e9b2b92a 100644 --- a/services/web/test/unit/src/Compile/ClsiCookieManagerTests.js +++ b/services/web/test/unit/src/Compile/ClsiCookieManagerTests.js @@ -30,7 +30,7 @@ describe('ClsiCookieManager', function() { } this.project_id = '123423431321' this.request = { - get: sinon.stub(), + post: sinon.stub(), cookie: realRequst.cookie, jar: realRequst.jar, defaults: () => { @@ -123,7 +123,7 @@ describe('ClsiCookieManager', function() { describe('_populateServerIdViaRequest', function() { beforeEach(function() { this.response = 'some data' - this.request.get.callsArgWith(1, null, this.response) + this.request.post.callsArgWith(1, null, this.response) return (this.ClsiCookieManager.setServerId = sinon .stub() .callsArgWith(2, null, 'clsi-9'))