mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-09 01:02:36 +00:00
Remove obsolete segmentation
payload in editing-session request
This commit is contained in:
parent
f625b22ec5
commit
b3f47ea44a
3 changed files with 4 additions and 8 deletions
services/web
app/coffee/Features/Analytics
test/unit/coffee/Analytics
|
@ -11,7 +11,7 @@ module.exports = AnalyticsController =
|
|||
if userId?
|
||||
GeoIpLookup.getDetails req.ip, (err, geoDetails) ->
|
||||
countryCode = geoDetails?.country_code || null
|
||||
AnalyticsManager.updateEditingSession userId, projectId, countryCode, {}, (error) ->
|
||||
AnalyticsManager.updateEditingSession userId, projectId, countryCode, (error) ->
|
||||
respondWith(error, res, next)
|
||||
else
|
||||
res.send 204
|
||||
|
|
|
@ -43,7 +43,7 @@ module.exports =
|
|||
opts.qs = {fromV2: 1}
|
||||
makeRequest opts, callback
|
||||
|
||||
updateEditingSession: (userId, projectId, countryCode, segmentation = {}, callback = (error) ->) ->
|
||||
updateEditingSession: (userId, projectId, countryCode, callback = (error) ->) ->
|
||||
if userId+"" == settings.smokeTest?.userId+""
|
||||
return callback()
|
||||
query =
|
||||
|
@ -52,9 +52,6 @@ module.exports =
|
|||
if countryCode
|
||||
query.countryCode = countryCode
|
||||
opts =
|
||||
body:
|
||||
segmentation: segmentation
|
||||
json: true
|
||||
method: "PUT"
|
||||
timeout: 1000
|
||||
url: "/editingSession"
|
||||
|
|
|
@ -14,7 +14,7 @@ describe 'AnalyticsController', ->
|
|||
getLoggedInUserId: sinon.stub()
|
||||
|
||||
@AnalyticsManager =
|
||||
updateEditingSession: sinon.stub().callsArgWith(4)
|
||||
updateEditingSession: sinon.stub().callsArgWith(3)
|
||||
recordEvent: sinon.stub().callsArgWith(3)
|
||||
|
||||
@controller = SandboxedModule.require modulePath, requires:
|
||||
|
@ -43,8 +43,7 @@ describe 'AnalyticsController', ->
|
|||
@AnalyticsManager.updateEditingSession.calledWith(
|
||||
"1234",
|
||||
"a project id",
|
||||
'XY',
|
||||
{}
|
||||
'XY'
|
||||
).should.equal true
|
||||
done()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue