mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3776 from overleaf/ho-post-clsi-cookie
convert _populateServerIdViaRequest to a post request GitOrigin-RevId: cbbf926708804527ba3717a66e9f0192ecf70fbd
This commit is contained in:
parent
94896bca4e
commit
d346172819
2 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ module.exports = function(backendGroup) {
|
||||||
callback = function(err, serverId) {}
|
callback = function(err, serverId) {}
|
||||||
}
|
}
|
||||||
const url = `${Settings.apis.clsi.url}/project/${project_id}/status`
|
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) {
|
if (err != null) {
|
||||||
OError.tag(err, 'error getting initial server id for project', {
|
OError.tag(err, 'error getting initial server id for project', {
|
||||||
project_id
|
project_id
|
||||||
|
|
|
@ -30,7 +30,7 @@ describe('ClsiCookieManager', function() {
|
||||||
}
|
}
|
||||||
this.project_id = '123423431321'
|
this.project_id = '123423431321'
|
||||||
this.request = {
|
this.request = {
|
||||||
get: sinon.stub(),
|
post: sinon.stub(),
|
||||||
cookie: realRequst.cookie,
|
cookie: realRequst.cookie,
|
||||||
jar: realRequst.jar,
|
jar: realRequst.jar,
|
||||||
defaults: () => {
|
defaults: () => {
|
||||||
|
@ -123,7 +123,7 @@ describe('ClsiCookieManager', function() {
|
||||||
describe('_populateServerIdViaRequest', function() {
|
describe('_populateServerIdViaRequest', function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
this.response = 'some data'
|
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
|
return (this.ClsiCookieManager.setServerId = sinon
|
||||||
.stub()
|
.stub()
|
||||||
.callsArgWith(2, null, 'clsi-9'))
|
.callsArgWith(2, null, 'clsi-9'))
|
||||||
|
|
Loading…
Reference in a new issue